开发者

Percentage of an inline video watched

I'm developing a website using PHP. On the site I would like to display an inline video for the user to view. Once he's happy he's viewed enough he will then click a link to another page. On this page I wish to display how much of the video he watched.

I开发者_如何学编程s this possible?

I assume I'll require some javascript or similar since the video will be playing on the client side?

Any help would be appreciated.

Thanks.


Have a look at http://flv-player.net/ works very well, open source and customisable.

Of particular interest to you may be: http://flv-player.net/players/js/

You will be able to use the values of 'position' and 'duration' to work it out as it's played.


If you use flowplayer you can use player.getTime() to determine the amount of the video played, and player.getClip().fullDuration to get the full length of the video, so the percentage played is simply player.getTime()/player.getClip().fullDuration

http://flowplayer.org/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜