JGoyer
asked on
Another windows media player q - check for video end
This is the code that is in an html page that I inherited. It takes a video created in ms producer for powerpoint 2003 and plays it in media player.
<!-- ---------------- MEDIA PLAYER -------------------------- ------- -->
<div id=LeftSideBackground style="position:absolute;d isplay:non e;WMPrerol lDisplay:n one">
<div id=MediaPlayerDiv>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (ClientCaps & Browser_SupportsNavigateCS S)
MediaPlayer_Create();
-->
</SCRIPT>
<div id=MediaPlayerControlsDiv style="position:relative">
<!-- MediaPlayer buttons -->
<div id=PlayerBL class=PlayerBL></div>
<div id=PlayerBC class=PlayerBC></div>
<div id=PlayerBR class=PlayerBR></div>
<a id=PlayerPlayPause OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 ></a>
<a id=PlayerPrevious OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 WMEnabled=0></a>
<a id=PlayerNext OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 WMEnabled=0></a>
<a id=PlayerDiscussion style="visibility:hidden" OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2></a>
<a id=PlayerSkipBack OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 WMEnabled=0></a>
<a id=PlayerSkipForward OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 WMEnabled=0></a>
<a id=PlayerVolume OnMouseOver="MediaPlayer_B uttonRollO ver(this)" ; OnMouseOut="MediaPlayer_Bu ttonRollOu t(this)"; OnMouseDown="MediaPlayer_O nMouseDown (this)" OnMouseUp="MediaPlayer_OnM ouseUp(thi s)" OnKeyDown="MediaPlayer_OnM ouseDown(t his)" OnKeyUp="MediaPlayer_OnMou seUp(this) " TABINDEX=2 WMEnabled=0></a>
<div id=PlayerClock NOWRAP style="visibility:hidden"> </div>
</div>
</div>
I want to be able to tell when the movie ends and write some javascript to do something at that point.
Thanks!
<!-- ---------------- MEDIA PLAYER --------------------------
<div id=LeftSideBackground style="position:absolute;d
<div id=MediaPlayerDiv>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (ClientCaps & Browser_SupportsNavigateCS
MediaPlayer_Create();
-->
</SCRIPT>
<div id=MediaPlayerControlsDiv style="position:relative">
<!-- MediaPlayer buttons -->
<div id=PlayerBL class=PlayerBL></div>
<div id=PlayerBC class=PlayerBC></div>
<div id=PlayerBR class=PlayerBR></div>
<a id=PlayerPlayPause OnMouseOver="MediaPlayer_B
<a id=PlayerPrevious OnMouseOver="MediaPlayer_B
<a id=PlayerNext OnMouseOver="MediaPlayer_B
<a id=PlayerDiscussion style="visibility:hidden" OnMouseOver="MediaPlayer_B
<a id=PlayerSkipBack OnMouseOver="MediaPlayer_B
<a id=PlayerSkipForward OnMouseOver="MediaPlayer_B
<a id=PlayerVolume OnMouseOver="MediaPlayer_B
<div id=PlayerClock NOWRAP style="visibility:hidden">
</div>
</div>
I want to be able to tell when the movie ends and write some javascript to do something at that point.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hmm
The only other way I can think of doing it is writing your own flash thing that loads up the video and tells the page to execute some JS when its done... that would work.
http://www.cbtcafe.com/flash/loadmovie/loadmovie.html
The only other way I can think of doing it is writing your own flash thing that loads up the video and tells the page to execute some JS when its done... that would work.
http://www.cbtcafe.com/flash/loadmovie/loadmovie.html
ASKER
Thanks for your time Oli! Your solutions will definitely work for what I am doing.
ASKER