The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Media Events Not Working in Safari/Chrome Reply To: Media Events Not Working in Safari/Chrome


It seemed to be a problem with the HTML5 Player I was using (SublimeVideo) as I tried it on CodePen and it worked perfectly.

So, instead of using native .addEventListener‘s, I’m using Sublime’s API and have managed to get it working.

    var player = sublime.player('the-video');

      start: function(player) { alert("Video has started") },
      end:   function(player) { alert("Video has ended"); }

P.S. I probably should have mentioned I was using Sublime in the beginning.

Thanks for all the help @g3logic!