Kevin Desai
Kevin Desai

Reputation: 149

SCM music player on a website

I want to implement a audio player on my website, it isnt a single page website and consist of multiple HTML pages.

I searched a lot and found scm music player to be the best choice. http://scmplayer.net/

I even started coding it. I just tried to implement the player in a blank html page Here is my code -

<html>

            <head>

            </head>
            <body>
            Test
            </body>

            </html>
            <script type="text/javascript" src="http://scmplayer.net/script.js" 
            data-config="{'skin':'skins/tunes/skin.css','volume':58,'autoplay':true,'shuffle':false,'repeat':1,'placement':'bottom','showplaylist':false,'playlist':[{'title':'Kabira (2013)','url':'https://soundcloud.com/kevin-desai-2/yeh-jawaani-hai-deewani-2013/s-KSS3w'},{'title':'Phir Muhabbat','url':'https://soundcloud.com/kevin-desai-2/phir-muhabbat-instrumental-1'},{'title':'Tum Hi ho- Aashiqui 2','url':'https://soundcloud.com/kevin-desai-2/tum-hi-ho-song-instrumental/s-tzfTz'},{'title':'Manzar Song','url':'https://soundcloud.com/kevin-desai-2/phir-muhabbat-instrumental/s-GLuGp'}]}" ></script>

I tried putting the script tag everywhere, but the music player does not appear only.

How do I get it to work?

Upvotes: 1

Views: 2691

Answers (1)

Stewart Mbofana
Stewart Mbofana

Reputation: 182

Put the script after the opening body tag like this

<!DOCTYPE html>

<head>
    <title>Test App</title>
</head>
<body>
    Test
    <script type="text/javascript" src="http://scmplayer.net/script.js" data-config="{'skin':'skins/tunes/skin.css','volume':58,'autoplay':true,'shuffle':false,'repeat':1,'placement':'bottom','showplaylist':false,'playlist':[{'title':'Kabira (2013)','url':'https://soundcloud.com/kevin-desai-2/yeh-jawaani-hai-deewani-2013/s-KSS3w'},{'title':'Phir Muhabbat','url':'https://soundcloud.com/kevin-desai-2/phir-muhabbat-instrumental-1'},{'title':'Tum Hi ho- Aashiqui 2','url':'https://soundcloud.com/kevin-desai-2/tum-hi-ho-song-instrumental/s-tzfTz'},{'title':'Manzar Song','url':'https://soundcloud.com/kevin-desai-2/phir-muhabbat-instrumental/s-GLuGp'}]}" > </script>

</body>

Also add the title.

Hope it works.

Upvotes: 1

Related Questions