Link to home
Start Free TrialLog in
Avatar of JGoyer
JGoyerFlag for United States of America

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;display:none;WMPrerollDisplay:none">
                  <div id=MediaPlayerDiv>

<SCRIPT LANGUAGE="JavaScript">             
<!--
if (ClientCaps & Browser_SupportsNavigateCSS)
      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_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2 ></a>
                              <a id=PlayerPrevious OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2 WMEnabled=0></a>
                              <a id=PlayerNext OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2 WMEnabled=0></a>
                              <a id=PlayerDiscussion style="visibility:hidden" OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2></a>
                              <a id=PlayerSkipBack OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2 WMEnabled=0></a>
                              <a id=PlayerSkipForward OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(this)" TABINDEX=2 WMEnabled=0></a>
                              <a id=PlayerVolume OnMouseOver="MediaPlayer_ButtonRollOver(this)"; OnMouseOut="MediaPlayer_ButtonRollOut(this)"; OnMouseDown="MediaPlayer_OnMouseDown(this)" OnMouseUp="MediaPlayer_OnMouseUp(this)" OnKeyDown="MediaPlayer_OnMouseDown(this)" OnKeyUp="MediaPlayer_OnMouseUp(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!
ASKER CERTIFIED SOLUTION
Avatar of OliWarner
OliWarner

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JGoyer

ASKER

Great idea.  Except there are going to be lots of different videos added by a non-techie who probably will not have a clue on the duration.  That would be an excellent way of handling it....If only ;-)
Avatar of OliWarner
OliWarner

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
Avatar of JGoyer

ASKER

Thanks for your time Oli!  Your solutions will definitely work for what I am doing.