Media Events Not Working in Safari/Chrome
I've got an alert that pops up when the video on said page plays and
finishes. Any reason why this is no longer working in Safari/Chrome? It
was working as recently as about 2 months ago.
$(document).ready( function() {
var v = document.getElementsByTagName("video")[0];
v.addEventListener("playing", function() {
alert("Video has started");
});
v.addEventListener("ended", function() {
alert("Video has ended");
});
});
Still works perfectly fine in Firefox.
Any help is appreciated. Thanks in advance.
No comments:
Post a Comment