ParticleCore / Iridium

Iridium is an extension built to improve your YouTube experience
Other
1.31k stars 139 forks source link

Clips not working when Iridium is enabled #954

Closed eduzappa18 closed 3 months ago

eduzappa18 commented 4 months ago

Youtube clips are not working with Iridium enabled The video player is all black and the description is not showing correctly they work normally when Iridium is disabled

tested on firefox 123.0 with Iridium 2.0.6

image

ParticleCore commented 4 months ago

~Can you provide a link for a clip?~

Nevermind, I was able to find one, will see what is going on.

ParticleCore commented 4 months ago

As a temporary workaround for now I believe enabling autoplay will make the clip work again, can you confirm that works for you?

eduzappa18 commented 4 months ago

As a temporary workaround for now I believe enabling autoplay will make the clip work again, can you confirm that works for you?

yeah I just tested it and it works when autoplay is enabled

ParticleCore commented 3 months ago

Seems like the issue is worse than I thought. If I cannot find a reliable way to enforce autoplay control on clip pages I might have to not enforce it only in those pages for the time being.

However, I believe modern browsers have the ability to refuse automatic video playback to a certain degree, I will explore this next to see if I can make it work. This would be a perfect solution because it would mean the extension would no longer need some aggressive overrides.

ParticleCore commented 3 months ago

Found the issue. When the video is initialized, or loaded with new data related to a video clip the process it undergoes is different than a normal load. As a result the automatic ability for the video to stop itself does not exist, so when it tries to stop internally when autoplay is disabled it hits an error:

image

The new workaround I'm testing is a form of play control instead of redirecting internal API methods, and so far appears to be working well with clip videos and autoplay off. However, without the stopVideo method the videos will buffer while paused but since clip videos so far do not appear to be stoppable it won't make a difference for that case specifically.