开发者

Video hit counter based on video play

I am hosting some video on my web and I would like to make a counter based on every video played, is that possible? I have made the counter based on the page load, here's 开发者_如何转开发the process:

I pull some of the videos on the front page labeled popular and newest, the counter I have made so far is when one click one of these videos, a page will popped out the counter adds itself in the database.

While these videos are also reside on each user's profile page along with their photos and audios, and of course I can't make the counter on this page based on page load because people who sees the page doesn't necessarily viewed or play the videos. The only idea I've come up with so far is that I would make the counter based on video play, but I don't know how to make one. Any suggestions?

Thanks.


The can have the attribute onplay=function(). Have the onplay send a XMLHttpRequest to a page that tallies the video counts.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜