Only seek if the video is not paused

This commit is contained in:
Ajay Ramachandran 2020-02-28 15:06:08 -05:00
parent af9a6b8a84
commit 0241e15691

View file

@ -493,8 +493,10 @@ function sponsorsLookup(id: string, channelIDPromise?) {
if (!seekListenerSetUp && !Config.config.disableSkipping) {
seekListenerSetUp = true;
video.addEventListener('seeked', () => startSponsorSchedule());
video.addEventListener('play', () => startSponsorSchedule());
video.addEventListener('seeked', () => {
if (!video.paused) startSponsorSchedule()
});
video.addEventListener('ratechange', () => startSponsorSchedule());
video.addEventListener('seeking', cancelSponsorSchedule);
video.addEventListener('pause', cancelSponsorSchedule);