Java Reference
In-Depth Information
} else {
if (document.audioPlayer.readyState == 4) {
plugInInstalled = true;
}
}
if (!plugInInstalled) {
document.forms[0].buttonPlay.disabled = true;
document.forms[0].buttonStop.disabled = true;
alert(“You need Quicktime to play the audio file!”);
}
}
onload = window_onload;
</script>
</head>
<body>
<object classid=”clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B”
codebase=”http://www.apple.com/qtactivex/qtplugin.cab”
id=”audioPlayer” width=”0” height=”0”>
<param name=”src” value=”sound1.mp3” />
<embed height=”0” width=”0” type=”audio/mpeg” src=”sound1.mp3”
pluginspage=”www.apple.com/quicktime/download”
enablejavascript=”true” name=”audioPlayer” />
</object>
<form id=”form1” name=”form1” action=”“>
<input type=”button” value=”Play” id=”buttonPlay” name=”buttonPlay”
onclick=”buttonPlay_onclick()“ />
<input type=”button” value=”Stop” id=”buttonStop” name=”buttonStop”
onclick=”buttonStop_onclick()“ />
</form>
</body>
</html>
Load quicktime.htm into your browser. As long as your browser supports plug-ins or ActiveX controls
and the QuickTime plug-in is installed, you should see something like what is shown in Figure 13-9.
Figure 13-9
Search WWH ::




Custom Search