jquery - video.js update video upon complete -
i attempting grab recent mp4 file on db - play - , upon completion repeat process. however, same file loops on , over. should noted i've checked web service & each time service requested give me new file expected.
is there different way update video player? prefer avoid using dispose method , re-creating whole player if possible.
videourl = '/myservice/get/' + sensorid + "?math=" + math.random(); _v_("video_player").ready(function() { var myplayer = this; myplayer.src({ type : "video/mp4", src : videourl }); myplayer.load(); this.on("ended", function() { myplayer.src({ type : "video/mp4", src : videourl }); });
i presume random number there cache-buster. videourl
wouldn't change 1 iteration next. you'd need generate new url each time, e.g.
this.on("ended", function() { videourl = '/myservice/get/' + sensorid + "?math=" + math.random(); myplayer.src({ type : "video/mp4", src : videourl }); });
Comments
Post a Comment