Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox - Random Video Skip #1

Closed
Fantazstic opened this issue Feb 11, 2024 · 8 comments
Closed

Firefox - Random Video Skip #1

Fantazstic opened this issue Feb 11, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Fantazstic
Copy link

Fantazstic commented Feb 11, 2024

I wanted to firstly thank you for creating this script, I can't imagine using my large (almost 600 items) music playlist without it.

I noticed that before using the script, Youtube can automatically move to next song up to a certain point (I remember similar reports of around video number 400+) which is when I started to look for and found this script to solve that issue.

It works really well for those videos where it just pauses at the end without moving to next song.

However, when viewing the first few videos (up to around 400), the script tends to trigger after/at the same time as when Youtube was already moving to next song anyway, and this results in a video being skipped. Unfortunately, it seems inconsistent as I assume it depends on network and hardware as well.

I find that it is more reproducible when you start the playlist and then open a new tab (I'm using Firefox browser on Windows 10) but it can still occur while you are directly viewing the Youtube tab.

I've tried my own edits to the script, such as waiting for the "Replay" button before pressing the next button, which works exactly as this script does, but this skipping bug still exists.

I think the solution is to find out a specific tag when Youtube is going to automatically move on to next song, which doesn't appear when the playlist abruptly stops. My limited knowledge prevents me from approaching this problem and generating solutions for it.

Another idea I tried to implement was to track any changes to the Youtube video title, but I cannot make this work well enough to overcome the bug and keep the playlist movement at the same time.

Thank you for reading my bug report and hopefully we can fix this as a community. Please let me know if you need any further information.

@Fantazstic
Copy link
Author

I believe I am mistaken. The bug only occurs when the browser tab/window is in the background. If you are directly viewing the tab, the bug does not occur.

@crazyrabbit0
Copy link
Owner

crazyrabbit0 commented Feb 12, 2024

You are welcome!

Thanks for your elaborate testing, the main issue is: I can't reproduce the bug on my pc.

Nevertheless, I made some changes based on a hunch, can you try this test and let me know if it works correctly ?

@Fantazstic
Copy link
Author

Fantazstic commented Feb 12, 2024

@crazyrabbit0

Hi, thanks for the quick testing branch release. Unfortunately, the bug still occurs.

Following my last message, I think it should be reproducible on stable and testing branch if you do the following:

  1. Find a large playlist that is affected by the playlist stop issue.
  2. Play the first song in the playlist and skip to near the end of the video.
  3. Quickly open a new tab and wait.
  4. You will see the Youtube tab move on to the second song but only very briefly.
  5. It then moves to the third song, therefore missing out the second song.

This only occurs if you open a new tab/browser window (basically the Youtube tab/browser window is in the background).

@Fantazstic
Copy link
Author

Fantazstic commented Feb 12, 2024

@crazyrabbit0

I have found a solution!

It seems to be caused by browser throttling the webpage when it's in the background, therefore the efficiency of the script is reduced and causes unintended bugs.

In Firefox, the following setting in about:config can be used to fix the issue:

dom.min_background_timeout_value_without_budget_throttling should be set to 10 (default is 1000).

Source - reddit (ignore the other boolean-type settings, they don't seem to have an effect)

So current stable branch is now working fine, there's no need to switch over to playback percentage tracking if we don't have to.

@crazyrabbit0
Copy link
Owner

Maybe that's why I don't have the problem. I use Chrome, not Firefox.
This is not an actual fix to the script though, meaning I can't do something about it.
Thanks again for your contribution! 🙏

@crazyrabbit0 crazyrabbit0 reopened this Feb 13, 2024
@crazyrabbit0 crazyrabbit0 added the bug Something isn't working label Feb 13, 2024
@crazyrabbit0 crazyrabbit0 changed the title [BUG] Accidental video skipping Firefox - Random Video Skip Feb 13, 2024
@crazyrabbit0
Copy link
Owner

@Fantazstic Do you happen to use the Adblock Plus extension ?

@Fantazstic
Copy link
Author

@crazyrabbit0

I use uBlock Origin in Firefox.

@crazyrabbit0
Copy link
Owner

Pity, I hoped it was the same bug as this one: #2
Nevermind, thanks for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants