ParticleCore / Iridium

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

Few features not working correctly when navigating to video for the first time #976

Closed ParticleCore closed 2 months ago

ParticleCore commented 2 months ago

While working on the fix #975 for I found that the method used to tell when the player is ready is not being called when the user navigates to a video for the first time:

https://github.com/ParticleCore/Iridium/blob/dfaa5dff87bc1d8600449bd67283d766eb5d2d95/src/firefox/js/background-inject.js#L473-L478

This means that any feature that only depends on this method being called (default quality, annotations control, etc.) will not be working correctly in that scenario. Will have to find a workaround for this issue.

ParticleCore commented 2 months ago

Issue affected the video focus, default quality, default speed, super theater, and annotations features but only in a specific scenario.

Had to change the method to detect when the player is ready to an override, which is not something I prefer but couldn't find a better way. The original API is no longer called when the player is initialized anywhere else other than the video page so it is no longer useful.