Feedback on: irt.org FAQ Knowledge Base Q191
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
The two code examples have onClick="" statements that contain double quotes, so they won't work in Netscape if you just cut and paste them.
Additionally, since I don't use the AudioLive plugin but Quicktime, the play() method isn't available in Netscape, resulting in a javascript error.
As a workaround I use
if (navigator.mimeTypes["audio/x-wav"].enabledPlugin.name == "LiveAudio")
document.sound.play(LOOP=1);
Worth:
Very worth reading
Comments:
I've tested the last piece of code, the wich one using BGSOUND, you declare about it is untested.
Well, the follow stop statement seems not to work, IE doesn't recognize objSound.Stop (nor objSound.stop() ):
<INPUT TYPE="BUTTON" VALUE="Stop" onClick="if (navigator.appVersion.indexOf('MSIE') !=-1) objSound.Stop(); else document.embeds['sound'].stop();">
So I slightly changed it:
<INPUT TYPE="BUTTON" VALUE="Stop" onClick="if (navigator.appVersion.indexOf('MSIE') !=-1) objSound.src=''; else document.embeds['sound'].stop();">
And then, as you can see, there is an amount of adjustements to do in comma-types.
Greetings, Marco
Greetings
Worth:
Not worth reading
Comments:
Not updated to latest version of MS Mediaplayer.
Worth:
Worth reading
Comments:
It should be noted that the MASTERSOUND attribute must be included in the EMBED tag in order to reference the .wav file by NAME in a Javascript. In Netscape 4 (testing for backward compatibility), adding the NAME attribute to the EMBED tag without an accompanying MASTERSOUND declaration prevented the sound from playing automatically:
<EMBED SRC="sound.wav" AUTOSTART="TRUE" LOOP="FALSE" WIDTH="0" HEIGHT="0" ALIGN="CENTER">
However, adding the MASTERSOUND attribute allowed the sound to play automatically on page load and made the .wav file's playback accessible to script control:
<EMBED NAME="wavfile" SRC="sound.wav" AUTOSTART="TRUE" LOOP="FALSE" WIDTH="0" HEIGHT="0" ALIGN="CENTER" MASTERSOUND>