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

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -