• HTML AutoPlay a sound clip
    9 replies, posted
Hey guys I was wondering how to auto-play a sound clip in the background of html page. I was hoping to play a sound in my MOTD screen in Garry's Mod. Please help.
[QUOTE=Jelly;31535155]Why would autoplaying music be acceptable even for a game server loading screen? I know when I [i]"game"[/i] I have my own music playing it'd be a pain in the ass and I'd simply disconnect from your server.[/QUOTE] See: [url]http://www.facepunch.com/threads/1113943-Autoplaying-music-on-website[/url]
<audio controls="controls" autoplay="autoplay"> <source src="song.ogg" type="audio/ogg" /> <source src="song.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio> instead of song.mp3, do i just replace it with my audio clips path?
Rethink what you're doing. Is it necessary? Is it going to piss more people off than not doing it? If so people are going to remember your server as the one that had the annoying fucking music. What purpose would having audio play on a motd be?
[QUOTE=Jelly;31574967]Rethink what you're doing. Is it necessary? Is it going to piss more people off than not doing it? If so people are going to remember your server as the one that had the annoying fucking music. What purpose would having audio play on a motd be?[/QUOTE] Elevator/waiting music is totally necessary.
[url]http://oct.vc/[/url] :) [editline]7th August 2011[/editline] I think that fits in this thread
Has anyone gotten audio tags working in Gmod anyway? It never worked for me. [editline]9th August 2011[/editline] Oh and I mean the loading screen page, not a MOTD or anything.
[QUOTE=RautaPalli;31610918]Has anyone gotten audio tags working in Gmod anyway? It never worked for me. [editline]9th August 2011[/editline] Oh and I mean the loading screen page, not a MOTD or anything.[/QUOTE] The loading screen doesn't actively update in a separate thread, which affects <audio>. You shouldn't be doing animation or sound within sv_loadingurl pages.
Invisible youtube video audio works perfectly from when I did it.
[QUOTE=tostopagaben;31623008]Invisible youtube video audio works perfectly from when I did it.[/QUOTE]Because that's handled by flash which handles it's own sound.
Sorry, you need to Log In to post a reply to this thread.