javascriptvideo.js

How to add event listener to videojs when start to play a video?


How do I add event listener to videojs when the video is start to play? (this event should be called at the begging of the play)?

I searched on Player Events docs, but I can't find any event that tell me "now the video is start play".


Solution

  • You can do this videojs way.

    play.on('play', () => { });
    

    enter image description here