Hey.
I know this question is asked some times now, and I've searched through the threads which already exist looking for my problem.
Well, the problem is that I want this music to play on loading screen, though it doesn't work once you see the loading screen upon joining the server, but in the browser it does work 100%.
Here are the ways I've tried to make it work, but all of them fail:
[code]
<embed id="audio-music" src="http://www.youtube.com/v/n83E5o_3Mlo?autoplay=1&loop=1&playlist=PLDHg1HANo1Rp9UOlOnTa8Xf4fHBgbix38" type="application/x-shockwave-flash" width="1" height="1" allowscriptaccess="always" allowfullscreen="true">
[/code]
[code]
<iframe src="http://www.youtube.com/v/n83E5o_3Mlo?autoplay=1&loop=1&playlist=PLDHg1HANo1Rp9UOlOnTa8Xf4fHBgbix38" style="visibility:hidden; display:none;" width="100%" height="100%"></iframe>
[/code]
[code]
<audio height="1" width="1" autoplay loop>
<source src="music.mp3" type="audio/mpeg">
<source src="music.ogg" type="audio/ogg">
<embed id="audio-music" src="http://www.youtube.com/v/n83E5o_3Mlo?autoplay=1&loop=1&playlist=PLDHg1HANo1Rp9UOlOnTa8Xf4fHBgbix38" type="application/x-shockwave-flash" width="1" height="1" allowscriptaccess="always" allowfullscreen="true">
</audio>
[/code]
All of these work in the browser, but not in game. Any ideas what could be the issue?
I noticed for example when I tried the iframe and I didn't hide it, so I saw the youtube player, it was just black like nothing loaded.
Any help would be greatly appreciated to solve this!
Well if it helps, my loading music can be heard in browser, but for some reason I can't hear it, although other players can. It may just be some setting, but I'm sure those codes look correct.
Just make sure you choose good music.
Can you play videos on the steam store? You probably need the special version of Adobe Flash 'for other browsers' to support youtube in garrysmod
Go here, choose your OS and select "flash player 11 for other browsers"
[URL]http://get.adobe.com/flashplayer/otherversions/[/URL]
note that anyone else who doesn't have it won't be able to hear it, you might be better off making an mp3 or other file and embedding that instead
[QUOTE=selfdestruk1;41741665]Can you play videos on the steam store? You probably need the special version of Adobe Flash 'for other browsers' to support youtube in garrysmod
Go here, choose your OS and select "flash player 11 for other browsers"
[URL]http://get.adobe.com/flashplayer/otherversions/[/URL]
note that anyone else who doesn't have it won't be able to hear it, you might be better off making an mp3 or other file and embedding that instead[/QUOTE]
Hmm yes. That could be it, because I can't play STeam Community youtubes.
Though yes, MP3 emding would be better, but as the code is currently, it does try play the MP3, OGG then Youtube if none of these work.
[code]
<audio height="1" width="1" autoplay loop>
<source src="music.mp3" type="audio/mpeg">
<source src="music.ogg" type="audio/ogg">
<embed id="audio-music" src="http://www.youtube.com/v/n83E5o_3Mlo?autoplay=1&loop=1&playlist=PLDHg1HANo1Rp9UOlOnTa8Xf4fHBgbix38" type="application/x-shockwave-flash" width="1" height="1" allowscriptaccess="always" allowfullscreen="true">
</audio>
[/code]
[QUOTE=Blt950;41743061]Hmm yes. That could be it, because I can't play STeam Community youtubes.
Though yes, MP3 emding would be better, but as the code is currently, it does try play the MP3, OGG then Youtube if none of these work.
[code]
<audio height="1" width="1" autoplay loop>
<source src="music.mp3" type="audio/mpeg">
<source src="music.ogg" type="audio/ogg">
<embed id="audio-music" src="http://www.youtube.com/v/n83E5o_3Mlo?autoplay=1&loop=1&playlist=PLDHg1HANo1Rp9UOlOnTa8Xf4fHBgbix38" type="application/x-shockwave-flash" width="1" height="1" allowscriptaccess="always" allowfullscreen="true">
</audio>
[/code][/QUOTE]
Perhaps its a silly question but do you have the mp3 file (music.mp3) hosted on your webserver in the same folder as your loading page?
Sorry, you need to Log In to post a reply to this thread.