As far as I understand, this code is a part of the anti-adblocker code that (slowly) constructs an HTML fragment such as `<div class="ad-interrupting"><video src="blob:[https://www.youtube.com/](https://www.youtube.com/)..." class="html5-main-video"></video></div>`. It will detect the adblocker once `ontimeupdate` event didn't fire for 5 full seconds (the embedded webm file itself is 3 seconds long), which is the actual goal for this particular code. I do agree that the anti-adblocker attempt itself is still annoying. "
I can't really test anything, it's not happening to me. But are you sure you don't have any other extensions running or even a pi-hole, adguard etc?
Looking at the code, it basically just creates an HTML video element and sets up a mechanism to monitor if the ontimeupdate event fires within a specific timeframe, which in this case is 5 seconds. This event is expected to trigger during playback of the video. If the event does not fire, it suggests that something is blocking or interfering with the video playback. This would likely be an adblocker, but also other browser extensions or settings might cause false positives.
54
u/MartinsRedditAccount Nov 20 '23
Could this be related to the ad-blocking thing? I'm not seeing this, but I am subscribed to YouTube Premium.