Support time
This commit is contained in:
+14
-1
@@ -17,9 +17,22 @@
|
||||
flags: { width: window.innerWidth, height: window.innerHeight }
|
||||
});
|
||||
|
||||
var lastId, player;
|
||||
|
||||
app.ports.registerVideo.subscribe(function(args) {
|
||||
var time = parseInt(args[2], 10) || undefined;
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
vd.setup(args[0], args[1] + "/manifest.mpd")
|
||||
if (args[0] !== lastId) {
|
||||
lastId = args[0];
|
||||
|
||||
player = vd.setup(args[0], {
|
||||
v: args[1] + "/manifest.mpd",
|
||||
t: parseInt(args[2], 10) || 0
|
||||
});
|
||||
} else if (time !== undefined ){
|
||||
player.currentTime(time);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user