Andres Andres - 7 months ago 25
Javascript Question

What's the play event on a video html5 element?

I have a video html5 tag embedded on page. I need to trigger an action when the user clicks the "Play Button". But I can't find how to bind that to my action. Is there an event for what I need? I'm using jQuery...



Does this W3C demo page help? It appears the play event is simply 'play'.

For example:

$('video').bind('play', function (e) {
    // do something


$('video').on('play', function (e) {
    // do something