Youtube playlist stops playing on next video when Firefox has no focus
Hello. I use youtube website as music player quite often (without premium) and play my favorite list of songs. Meantime, when Google started meddling with youtube due to their new offer as youtube premium I met two most annoying issues like "are You still watching" dialog and the behaviour where youtube just cleared "repeat list" function without my consent. Both issues was resolved with java scriplets I took from community.
Now I run into third issue but not sure how to diagnose it. If Firefox is in the background, or tab with youtube has no focus the playlists stops from time to time. The moment it stops is when next video should start playing. When browsing on different tab, I can see on Youtube tab that title of the video has changed (to the next video) and even the song started (for 1-2 seconds) then video pauses and word "playing" disappears from tab (normally there should be title on tab and "playing" word under title). It is not "are You still watching" dialog issue because if I move mouse cursor on youtube tab (even without setting focus on it) the player will continue - till next song.
The issue doesn't appear if youtube tab is active. I can't use developer tools in firefox because can't debugging website when tab of the site is not active (at least I don't know how). I tried to find solution with community but with no success. I allowed youtube to play video and sound always without exception in firefox preferences but it is not the solution.
Any tips?
Svi odgovori (1)
For 99% probability the issue is related to YT api. I added line as below to my scriplet: document.querySelectorAll('.html5-main-video').forEach(vid => vid.play()); Scriplet launches each 5 seconds so now I have a small break beetween videos. I am pretty sure YT api detects no focus or background state of Firefox and stops playing. Wonder if I can somehow reset time YT is counting.