问题
Is it possible to get the video events using HTML5 and jQuery?
Events like:
- When the user start the video, get that event.
- When the user paused/stopped the video, get the time of the played video and remaining time to be played.
- When the video is played or not or not played because of error.
回答1:
You can find the events here: http://www.w3.org/2010/05/video/mediaevents.html
Example:
$("video").on("pause", function (e) {
console.debug("Video paused. Current time of videoplay: " + e.target.currentTime );
});
来源:https://stackoverflow.com/questions/13557306/video-events-html5-jquery