Search code examples
flashswfobject

How to get current position from embedded flash videos?


I'm using SWFObject to embed Flash Videos. Is there a way to get notified as soon as the user hits some specific time marks of the embedded video? I.e. get a notification from the Browsers Flash Plugin?

My goal is to change the page content at specific times of the embedded video.

Thanks,

Sebastian


Solution

  • Depending on what player you are using, you could change the the page content based on what point the player's timer is at.

    For instance, in the jwplayer, here we get the current time of the video:

    var player = null;
    function playerReady(thePlayer) {
       player = document.getElementById(thePlayer.id);
       player.addModelListener('TIME','playTracker');
    }
    function playTracker(eventData) {
       alert(eventData);
    }