javascript - detecting the end of video using jwplayer? -
im using jwplayer thier javascript api, im trying detect when end of video @ moment have tried this:
ontime: function(event) { console.log(this.getduration()); console.log(this.getposition()); if (this.getposition() === this.getduration()) { return alert("im done"); } } but alerts twice "im done", , not efficient way detect end of video?
use oncomplete(callback).
oncomplete: function() { return alert("im done"); }
Comments
Post a Comment