Re: Player.controls.play() doesn't work in IE, but works in Firefox
- From: "Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx>
- Date: Tue, 12 Sep 2006 17:54:51 GMT
Well that's just going to break it for FireFox isn't it ?
FF doesn't have a mediaPlayer as a child of anything other than the
document - IE "helpfully" includes the window namespace in the
javascript object list so you're actually calling window.mediaPlayer
here.
But the embedded object isn't a child of the window object, it's a
child of the document object, so IE is defective (this has been known
for a long time BTW)
Cheers - Neil
On Tue, 12 Sep 2006 05:36:01 -0700, Frances
<Frances@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In your javascript functions, try simply using------------------------------------------------
mediaPlayerObj.controls.play();
mediaPlayerObj.controls.pause();
etc and remove the document.getElementbyID part
Frances
"Robson WT" wrote:
I have made some tests with Javascript controlling a Windows Media Movie
embedding in a web page
<script language="javascript">
function playPauseVideo() {
document.getElementById('mediaPlayerObj').controls.play();
mediaPlayerObj.controls.play();
}
function stopVideo() {
document.getElementById('mediaPlayerObj').controls.stop();
}
</script>
<body>
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
name="mediaPlayerObj" width="330" height="238" id="mediaPlayerObj">
<param name="uiMode" value="none">
<param name="url" value="luta.wmv">
<param name="autoStart" value="true">
</object>
<a href="javascript:;" onClick="playPauseVideo();"><img
src="imagens/play_button.gif" name="playPauseButton" width="26" height="25"
border="0" id="playPauseButton" /></a>
<a href="javascript:;" onClick="stopVideo();"><img
src="imagens/stop_button.gif" name="stopButton" width="20" height="19"
border="0" id="stopButton" /></a>
I've installed the Firefox Active X plugin. In FF, the movie starts playing.
I've cilcked in my customized Stop Button and the movie stops. I click in my
customized Play button and the movie plays.
In Internet Explorer the movie starts playing. I click on my customized stop
button and the movie stops, but I click on my customized play button and the
movie **doesn't*** play! Does anyone know why this happens?
I was using IE 6 with Windows Media Player 9. I've tried to upgrade to
Windows Media Player 10 but the problem persists.
Thanks for your attention
Robson.
Digital Media MVP : 2004-2006
http://mvp.support.microsoft.com/mvpfaqs
.
- Prev by Date: Re: How to get fastForward to work in the Windows Media Player Control?
- Next by Date: Re: Can you use an ASX playlist in an embedded player?
- Previous by thread: Re: Serious problem with search
- Next by thread: Re: Player.controls.play() doesn't work in IE, but works in Firefo
- Index(es):
Loading