I've spent hours searching for a solution. Finally I've found a working one and I'm sharing it. I understand that it might not be "by the book", but it works.
I used SCM Player for this. You can use wizard on this site to generate player options or download source files from github if you wish to host script at your own site.
I used SoundCloud to upload a song "I wanted" (actually a client's wish) to loop on the site. After you upload a song you can copy link by clicking Share button bellow the uploaded song or songs.
If you choose option one, you can generate playlist directly at SCM Player website through wizard. If you decide to host this player at your site, just download ZIP file from github and unpack it to e.g. /site/all/libraries/scmp. After that you can start wizard by loading "www.yoursite.com/sites/all/libraries/scmp/index.html". Use the wizard the same way as in first option.
Then you need to put generated code to your html pages. I tried using drupal_add_js() function without luck. I didn't know how to pass arguments correctly, and if someone does know, feel free to write.
Instead I used suggestion from this Thread where it says to put code to "html.tpl.php". I found other thread that explains how to override this file, but as my theme doesn't have templates folder it didn't work out for me. I simply made changes directly to html.tpl.php from drupal/modules/system/ directory. You should remember that if you update drupal core this file will be overwritten.
I put my code like this:
<body class="<?php print $classes; ?>" <?php print $attributes;?>>
<!-- SCM Music Player http://scmplayer.net -->
<script type="text/javascript" src="http://www.yoursite.com/sites/all/libraries/scmp/script.js" data-config="{'skin':'skins/black/skin.css','volume':50,'autoplay':true,'shuffle':false,'repeat':2,
'placement':'bottom','showplaylist':false,'playlist':[{'title':'Test Song','url':'https://soundcloud.com/link-to-song'}]}" ></script>
<!-- SCM Music Player script end -->
<div id="skip-link"> ..... /*rest of body...of your html.tpl.php*/
Everything inside script tags is one line. Also change links to script.js and songs according to your needs.
This way player is loaded and you can browse site pages without interrupting playback. I hope it helps someone.
Comments
=-=
you could have created your own templates folder in your subtheme and copied the html.tpl.php file to it or you could have copied the html.tpl.php to the root of your subtheme folder. Either way, there is no need to hack core files for this.
-
Thank you for your response. I tried that both putting it inside theme folder or creating templates folder, but it didn't work. It didn't make any difference, html.tpl.php from system folder was always the one loading. Maybe I missed something. I would certainly like to do it in my subtheme folder. BTW, I'm using Bluemasters theme. When I have time, I will try this with some other theme.
I didn't find satisfactory solution to continuous playback in Drupal, so it would be nice to come to a full and clean solution.
=-=
That indicates that you did not clear the DB cache tables to reset the theme registry and have it pick up the new tpl.php file added to the theme. Using bluemasters is fine, though I'd suggest a subtheme of bluemasters.
You were right. I did make a
You were right. I did make a mistake and forgot to empty the cache. I replaced html.tpl.php inside system folder with original file, and then recreated "templates" folder inside bluemasters theme folder and copied there the changed html.tpl.php. And it works just fine. Thank you for your help.
As an alternative solution,
As an alternative solution, Ajax pages makes it possible to have continuous playback on your website without restricting you to a particular player.