Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Controlling Windows Media Player with Firefox/Mozilla .controls is void for Windows Media Player embedded object smo47
In trying to embed and control the Windows Media Player in a somewhat browser independent way.
Using the following HTML
<embed src="test.wmv" name="MyMediaPlayer" controls="ImageWindow" autostart="0" showcontrols="0" height="200" width="320" />
This works fine and dandy in IE, but, in Firefox/Mozilla .controls is void. :(
I rummaged about and found a suggestion to try
But Firefox reports that .play() is undefined. :(
I'm no expert here, but I'm guessing that you're not callig the reference correctly. Try giving your <embed> id="MyMediaPlayer" then call it with:
Thanks for the response.
I'm not getting an undefined error on the reference to document.MyMediaPlayer
But for grins, I changed the embed as per your suggestion.
<embed src="test.wmv" name="MyMediaPlayer" id="MyMediaPlayer" controls="ImageWindow" autostart="0" showcontrols="0" height="200" width="320" />
I then looked at document.MyMediaPlayer and document.getElementById('MyMediaPlayer') using the debugger. They were the same object with .controls set to void.
Maybe it's the case that Microsoft does not give the <embed> object any access to .controls and requires ActiveX. :(