Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Another windows media player q - check for video end

Posted on 2004-10-14
4
Medium Priority
?
287 Views
Last Modified: 2008-01-16
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!
0
Comment
Question by:JGoyer
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
OliWarner earned 2000 total points
ID: 12308543
If you knew how long the video was, you could use a timer to load a function...
0
 
LVL 2

Author Comment

by:JGoyer
ID: 12308763
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 ;-)
0
 
LVL 16

Expert Comment

by:OliWarner
ID: 12309011
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
0
 
LVL 2

Author Comment

by:JGoyer
ID: 12393785
Thanks for your time Oli!  Your solutions will definitely work for what I am doing.
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question