Welcome to WebmasterWorld Guest from 54.146.217.179

Forum Moderators: open

Message Too Old, No Replies

Javascript to turn off background sound.

     
9:29 pm on Dec 10, 2002 (gmt 0)

New User

10+ Year Member

joined:Nov 17, 2002
posts:6
votes: 0


Does anyone know of a way of providing visitors to my home page with an option to turn off the background sound? The sound file I'm using is a .wav - something like an on/off button or a clickable link would be nice :-)

Thanks!

11:26 pm on Dec 10, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


It's a bit more complex than you might think. Here's one discussion, with some code examples:
javascripter.net [javascripter.net]

Also, here's a column with some good food for thought about background sound controls:
HTML Goodies [htmlgoodies.com]

I haven't programmed any background sound for years, even on musician's sites - it just doesn't seem user friendly to me.

11:48 pm on Dec 10, 2002 (gmt 0)

New User

10+ Year Member

joined:Nov 17, 2002
posts:6
votes: 0


I absolutely agree; the background sound slows down the page loading even though it's compressed as much as possible, apart from everything else. Every so often I try and sneak it off but get deluged with e-mails and postings on my site's bulletin board asking me to put it back.

Anyway, thanks for the links; I've copied some Javascript for an on/off button from one of them :-)

11:56 pm on Dec 10, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


Eh, if all else fails there's still the old 'Esc' button. Works for me.

Pendanticist.

12:49 am on Dec 11, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Apr 4, 2002
posts:236
votes: 0


Yet another use for Flash, you can give full control over the sound (start, stop, pause, etc) and it will stream. Best part is that the music is in mp3 format.