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

Issue with Playback Speed Not Resetting to Normal After Skipping Ads #2

Closed
JATQK opened this issue Jan 27, 2024 · 5 comments
Closed

Comments

@JATQK
Copy link

JATQK commented Jan 27, 2024

Issue Description

After using the AutoSkip for YouTube extension on Safari 17.3 with my MacBook 14 m1Pro (macOS 14.3), I encountered a consistent issue. The extension effectively skips unskippable ads by speeding them up. However, once these ads are skipped, the video's playback speed fails to reset to the normal speed (1x) or the pre-ad speed. This results in the video continuously playing at the high speed set for ad-skipping.

Steps to Reproduce

  1. Install the AutoSkip for YouTube extension on Safari 17.3, macOS 14.3.
  2. Watch YouTube videos until you encounter two consecutive unskippable ads.
  3. Observe the extension speeding up these ads.
  4. Notice that post-ad, the video sometimes continues at high speed instead of returning to normal speed.

Expected vs. Actual Behavior

  • Expected: Post-ad, video playback should revert to 1x or the pre-ad set speed.
  • Actual: Video remains at the high 16x speed post-ad.
@notarisj
Copy link
Owner

I will try to reproduce it and push a fix. I am also using Safari 17.3 in macOS 14.3, and I've never had this issue. If you can pause the video when this happens and attach the full HTML source, it would help.

@JATQK
Copy link
Author

JATQK commented Jan 27, 2024

I wanted to reproduce it and as it turns out, first try got the bug 👯

I hope that the html can provide valuable insights. 🤞

Perhaps it's worth mentioning that I'm using the extension Accelerate to adjust the speed using hotkeys. However, I had / have the belief that the manipulation of speed in your extension would not affect each other.

Buggy Speed.html.zip

@notarisj
Copy link
Owner

I installed Accelerate and I am getting the same issue, so there must be an incompatibility when running together.

If you check the code, I never set the playback rate back to normal. It verifies the existence of the ad overlay and then sets the rate to x16. I didn't need to because YouTube seems to set it back after the ad ends. With that said, the mutation observer implementation is calling this method multiple times, which might cause the issue. I will optimize the observer to see if it fixes it but it's tricky.

@notarisj
Copy link
Owner

notarisj commented Feb 1, 2024

@JATQK Check v1.1-beta where you can disable the speedup and only push forward in the ad. I haven't figured out a solution for the speedup issue with Accelerate. If you have any suggestions let me know.

@notarisj
Copy link
Owner

@JATQK This should be fixed now with the embed approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants