I'm trying to create a multicam video streaming, it looks like this
there is a custom control below, i wanted to replace default video control since i didn't get what i wanted. I've succesfully managing time and seeking function on my custom progress bar, but due to videos are unsynchronize after user try to do the seeking, so i pause all of the video first, then changing every currentTime
of the video like this.
updateTime(e) {
this.plyr.toArray().forEach((plyr) => plyr.player.pause());
let userTimeSeek = (e.target.value * 100) / 186;
if (userTimeSeek > this.buffered) {
console.log("Click twice");
}
this.plyr.toArray().forEach((plyr) => {
plyr.player.currentTime = parseFloat(e.target.value);
this.time = e.target.value;
this.remaining = this.parse(
plyr.player.duration - plyr.player.currentTime
);
});
if (
this.plyr.toArray()[0].player.currentTime ===
this.plyr.toArray()[2].player.currentTime &&
this.plyr.toArray()[1].player.currentTime ===
this.plyr.toArray()[2].player.currentTime
) {
//PLAY
}
}
//PLAY
I wanted to call play function here, if i add play function it gives me error
what does that mean?