Help with adding background music to server loading screen..

I decided to create a custom loading screen for my server. I tried adding some music to it by adding an invisible music player (grooveshark) and it works on the website, but it’s just not working in gmod.

HTML:



<html>
        <head>
                <title>basic loading screen</title>
                <style type="text/css">
                        body {
                                padding:0px;
                                margin:0px;
                                background-color:#000000;
                        }
                </style>
        </head>
        <body>
                <img src="http://i.imgur.com/dpzCGpR.jpg" style="max-width:100%; max-height:100%; position:absolute; margin:auto; top:0; left:0; bottom:0; right:0;" alt="">
 
        </body>
        <object width="0" height="0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong4047359899" name="gsSong4047359899"><param name="movie" value="http://grooveshark.com/songWidget.swf" /><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=grooveshark.com&songID=40473598&style=metal&p=1" /><object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="0" height="0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=grooveshark.com&songID=40473598&style=metal&p=1" /><span><a href="http://grooveshark.com/search/song?q=Unkown%20One%20Hundred%20Thousand%20Subscribers" title="One Hundred Thousand Subscribers by Unkown on Grooveshark">One Hundred Thousand Subscribers by Unkown on Grooveshark</a></span></object></object>
</html>


It takes a second for the music to play. Though to be honest, since i’ve loaded the server prior, it doesn’t take as long for me to load in which makes me think i’m just not on the screen long enough to hear the song play…

If one of you could connect and tell me if it works, that’d be great.

Server: 50.31.103.163:27015

UPDATE:

Instead of using a grooveshark playlist I decided to try a direct link… Still doesn’t work in gmod…

HTML:



<html>
        <head>
                <title>basic loading screen</title>
                <style type="text/css">
                        body {
                                padding:0px;
                                margin:0px;
                                background-color:#000000;
                        }
                </style>
        </head>
        <body>
                <img src="http://i.imgur.com/dpzCGpR.jpg" style="max-width:100%; max-height:100%; position:absolute; margin:auto; top:0; left:0; bottom:0; right:0;" alt="">
 
        </body>
        <embed height="0" width="0" src="http://k007.kiwi6.com/hotlink/b6f2tk3kn8/One_Hundred_Thousand.mp3">
</html>


I’m running out of ideas. Anyone have any other ways?

Obviously having a custom loading screen has its cons.

First, the player have to download the loading HTML, CSS and image, while streaming the music on top of downloading server files. This would maximize most players network for a short while which would result in a few seconds delay of loading the music and the entire loading screen.

I understand the cons of having a loading screen, but my server is relatively basic compared to other servers. I’ve visited quite a few other servers that had a ton of addons and I still managed to instantly play the music on their loading screen. Thank you for your reply but it doesn’t help me much.

Let me rephrase my original question… Why does it work on the site but not on gmod? Is it a problem with GrooveShark? Are there alternatives ways to automatically play music?

Have you tried the autostart=“true” attribute?



<embed height="0" width="0" autostart="true" src="http://k007.kiwi6.com/hotlink/b6f2tk3kn8/One_Hundred_Thousand.mp3">


Added it in and it did make the music autoplay faster than before. (at least it seemed like it)

But it still doesn’t work in gMod.

I may just make a video of the image and add music to it then upload it to youtube and use sv_loadingurl “youtube url” and see if that works.

Or you just google “my song i want to have mp3 download” and then you download it and put it on your webhost?

You need to convert the song into an ogg format… Just google it its easy.

I’m sure if you would of read the help docs of your loading screen you would of found out.

I was originally using tumblr so I didn’t have FTP access to upload my music, but I switched over to a free host and then tried it but it still didn’t work.

THANK YOU.

Switched out the .MP3 for a .OGG and it worked perfectly.

/thread