Solved

Another windows media player q - check for video end

Posted on 2004-10-14
4
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

636 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