Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video events HTML5 jQuery

Is it possible to get the video events using HTML5 and jQuery?

Events like:

  1. When the user start the video, get that event.
  2. When the user paused/stopped the video, get the time of the played video and remaining time to be played.
  3. When the video is played or not or not played because of error.
like image 519
jamcoder Avatar asked Nov 26 '12 00:11

jamcoder


1 Answers

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 );
});
like image 75
macool Avatar answered Sep 20 '22 14:09

macool