pixeltris / TwitchAdSolutions

7.75k stars 446 forks source link

Video switching during adblocking #206

Closed umutbalkan closed 3 months ago

umutbalkan commented 10 months ago

While blocking ads the stream player that I watch switch to some other stream that I am not following. Stream that I watch: Screenshot 2023-11-20 230624

Somehow and somewhat changed to this content image

After blocking ads prompt reversed to normal: image

I am not sure how this happens

pixeltris commented 10 months ago

There isn't anything in the scripts which could cause an actual page change as in your second picture. For the video-swap-new script there is code which triggers a player refresh when swapping the active m3u8 but I can't see anything which would cause it to pick up a different stream.

Do you have any other extensions which might be causing it?

umutbalkan commented 10 months ago

Not the page but the video stream itself changed momentarily to the stream from 2nd screenshot during blocking ads prompt, later on switched back to the stream that I watch. I do not have any extensions other than BetterTTV. I found the stream that is displayed during blocking prompt just by luck and curiosity. Simply, Page itself did not change other than the video stream. I just attached the og content at 2nd screenshot where the switched video is from just to show it

pixeltris commented 10 months ago

Is this something you're able to consistently reproduce? The only thing I can think of might be this:

https://github.com/pixeltris/TwitchAdSolutions/blob/3eb915d774d9cb72acb52bd87ab3675a21d0b803/video-swap-new/video-swap-new.user.js#L226-L238

It might potentially be wiping over the channelName var when quickly clicking between channels but I'm not 100% sure of the scoping in this case. If it is the issue then let might fix it.

umutbalkan commented 10 months ago

I cannot reproduce it, I did nothing other than watching a stream. I am too ignorant about the tech behind this to make any reasoning, but I cannot justify how two unique channel names somewhat collide also happen to be live at the same time.