Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

How to fix source of pause range that changes video in HTML

$
0
0

When I pause a video between 2-4 secs, it'll change the video without any issues. But when I want to add a specific video src to change it only if it's that video, it doesn't work.

So how would I fix the 'something-skippable.mkv' portion?

vid.addEventListener('pause', (e) => { if (e.currentTarget.src === 'something-skippable.mkv' && e.currentTarget.currentTime > 2 && e.currentTarget.currentTime < 4) { vid.src = 'something-else.mkv'; } });

Viewing all articles
Browse latest Browse all 67411

Trending Articles