MyBB Community Forums

Full Version: Background music code for all browsers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I was searching for a code to add background music to my site, and I now realize it might not work with all browsers (as I even saw I needed to install a plugin in firefox to work, in the search results pages which had an example thing).

I mean really background music, they shouldn't be able to stop the music. (like with a button, no).
So ugh.. is there any code that works for all or most browsers? I just mean like Firefox, IE and maybe Chrome. Not much.
In my personal opinion, if a site were to start playing sounds on my computer without my permission then the first thing I'm clicking is the close button, especially if there's no other way to stop it.

Having said that, there are some websites where it's expected, like YTMND. You might want to go to one of those pages and view the page source to see how they did it.
<embed src="file.ext" hidden="true" autostart="true" />

That should work. If you want the music to loop just add loop="true" to that.
(2009-08-31, 06:20 PM)Firestryke31 Wrote: [ -> ]In my personal opinion, if a site were to start playing sounds on my computer without my permission then the first thing I'm clicking is the close button, especially if there's no other way to stop it.

Same here.

You could use the new <audio> tag of HTML 5 Wink
(2009-08-31, 06:11 PM)faviouz Wrote: [ -> ]I was searching for a code to add background music to my site, and I now realize it might not work with all browsers (as I even saw I needed to install a plugin in firefox to work, in the search results pages which had an example thing).

I mean really background music, they shouldn't be able to stop the music. (like with a button, no).
So ugh.. is there any code that works for all or most browsers? I just mean like Firefox, IE and maybe Chrome. Not much.

ITS FREE HERE

Using this plugin, you can embed sounds in your forum's background Cool
yeah lol, pretty sure it just adds the embed code.
Which would not work if users don't have apple quicktime.
(2009-09-01, 12:40 PM)faviouz Wrote: [ -> ]yeah lol, pretty sure it just adds the embed code.
Which would not work if users don't have apple quicktime.

Did you read the entire thread ? :|

This plugin have settings in ACP, which enable you to add sound file URL and play the sound globally. It not just embed the sound file in templates. Its not even a template edit, it hooks to global
lol epic fail. How do you want me to read something I don't have access to?
I get an 403 Forbidden error when trying to access the thread lol.

Anyway how's that any good? I can also get it to work globally by just adding the embed code to headerinclude.
its good if there is a stop button embed so if you want to stop it.. Smile
(2009-09-01, 01:56 PM)faviouz Wrote: [ -> ]lol epic fail. How do you want me to read something I don't have access to?
I get an 403 Forbidden error when trying to access the thread lol.

Anyway how's that any good? I can also get it to work globally by just adding the embed code to headerinclude.

Well ... Yes you can embed code in templates etc. But mien plugin is not a template edit, it has hooks, functions and settings to stop OR play the sound. Also you can assign the music URL in AdminCP.

Uhh.. I can't remember that I banned any one's IP etc. which in your's case 403 forbidden error will be shown to those whom IP is banned. Actually my host report me some hacking attempts from certain countries, they banned them from accessing the site.. they also report the originating countries, But I think you are from Portugal and I never thinks so that users from Portugal done any thing wrong with my site... Can you please PM me your IP so that I notice this all...

(2009-09-01, 02:05 PM)AndrewPH Wrote: [ -> ]its good if there is a stop button embed so if you want to stop it.. Smile

Yes, mien plugin have ON / OFF button to Play / Stop respectively.
Pages: 1 2 3