Solved

Another windows media player q - check for video end

Posted on 2004-10-14
4
266 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 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now