jamcoder
jamcoder

Reputation: 569

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.

Upvotes: 19

Views: 43021

Answers (1)

macool
macool

Reputation: 658

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 );
});

Upvotes: 29

Related Questions