[cgiirc-general] Re: Beyond browser-specific interfaces?
Brought to you by:
dgl
From: Giuseppe B. <bil...@ho...> - 2006-05-22 17:04:24
|
On Mon, 22 May 2006 18:28:00 +0200, Giuseppe Bilotta wrote: > I'm looking for a cross-platform JavaScript to play/pause/stop sounds. > > In the mean time, I suggest the ie template be updated to change > > if (sound) sound.play(); > > into > > if (sound) { if(sound.play) sound.play() } > > to make the script work without fail in all browsers. Further possible > enhancements consists in adding the attribute enablejavascript="true" > to the <embed> elements, and use width=0 height=0 instead of > hidden="true". Addendum: running small tests here I discovered that using sound.dispatchEvent("play") seems to play the sound file of a nonhidden embed element both in Opera and in Mozilla SeaMonkey. So if the suggested changes are done to <embed> elements, chaning if (sound) sound.play() into if (sound) { if (sound.play) sound.play() ; else sound.dispatchEvent("play") ; } is more likely to work in a wider range of setups. -- Giuseppe "Oblomov" Bilotta "I weep for our generation" -- Charlie Brown |