The BreakPlayer plugin skips the break but allows you to select minutes in it. Previously, this plugin didn't allow this selection.
I modify with this code:
skipTo(time) {
var areBreaksClickable = paella.player.config.plugins.list[this.getName()].neverShow;
var newTime = time + (areBreaksClickable ? .5 : 0);
paella.player.videoContainer.trimming()
.then((trimming) => {
if (trimming.enabled) {
if (time >= trimming.end) {
newTime = 0;
paella.player.videoContainer.pause();
} else {
newTime = time + (areBreaksClickable ? .5 : 0) - trimming.start;
}
paella.player.videoContainer.seekToTime(newTime);
}
else {
return paella.player.videoContainer.duration(true);
}
}).then((duration) => {
if (time >= duration) {
newTime = 0;
paella.player.videoContainer.pause();
}
paella.player.videoContainer.seekToTime(newTime);
});
}
But the problem is that when you select a minute in the break, the player plays a video one millisecond and I want to skip to the end of break without showing that millisecond.
Anyone have any ideas?
Thank you.
The BreakPlayer plugin skips the break but allows you to select minutes in it. Previously, this plugin didn't allow this selection.
I modify with this code:
But the problem is that when you select a minute in the break, the player plays a video one millisecond and I want to skip to the end of break without showing that millisecond.
Anyone have any ideas?
Thank you.