Search code examples
phpjqueryflowplayerjwplayer

How to display HTML after video play finishes?


I am new here.

I would like to know how can I display HTML code after a video is finished playing. I am using FlowPlayer (http://www.flowplayer.org) .

I have tried to achieve this using JW Flash Player (http://www.longtailvideo.com/players/jw-flv-player/), but was unable figure out anything.

Also, let me know if it's possible or not. And if it is, please share with me and everybody on StackOverflow.

P.S. I am using PHP.


Solution

  • According to the FlowPlayer documentation an onFinish event is fired when the video finishes. While I've just changed some of the example code something like this should work:

    flowplayer("player", "yourmoviefile.swf", {  
    
        // a clip object 
        clip: { 
    
            // a clip event is defined inside clip object 
            onFinish: function() { 
                $('#finish').html('your string to show here');
                alert("clip started"); 
            }  
        }
    });
    

    The line of jQuery will insert the html string you specify into a div with an ID of finish.