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

bug: Sponsor block skipping not working properly in background mode #1253

Closed
3 tasks done
rikinp93 opened this issue Mar 16, 2023 · 7 comments
Closed
3 tasks done

bug: Sponsor block skipping not working properly in background mode #1253

rikinp93 opened this issue Mar 16, 2023 · 7 comments
Labels
Bug report Something isn't working

Comments

@rikinp93
Copy link

Type

Other

Bug description

Version: 18.05.40

Sponsorblock skipping when in background playback mode not working correctly. It doesn't skip in correct places on the videos, sometimes not even skipping.

When the app is open, not in background mode, skips are working correctly.

All sponsorblock settings are skip automatically.

Previous version 17.49.37 works fine.

Steps to reproduce

Select videos with sponsorblock skips at beginning of videos etc. Switch screen off and play YouTube in background mode. Skips not happening correctly.

Relevant log output

-

Screenshots or videos

No response

Solution

Use a previous version 17.49.37

Additional context

No response

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@rikinp93 rikinp93 added the Bug report Something isn't working label Mar 16, 2023
@LisoUseInAIKyrios
Copy link
Contributor

I tried with a video minimized and playing in picture in picture mode, and tried with the screen turned on and turned off.

I cannot reproduce this. For me segments skip correctly in all situations.

@rikinp93
Copy link
Author

rikinp93 commented Mar 16, 2023

It happens when in My mix/playlists (music videos). PIP is disabled, purely background mode. Also using a Google Pixel 7 pro. Using all the working patches too. Skipping works fine when the app is open. When put into background mode then skipping seems all over the place between videos.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Mar 16, 2023

I still don't see the issue when using playlists.

Does the intro skip happen, but it's delayed and the video plays a few seconds and then it skips? Or is the intro segments very short (less than 5 seconds)?

Because it's normal for intro segments to play a few seconds before they skip. The video starts playing, before the client receives the segments from the sponsorblock API.

When in background mode a video starts playing much faster (since it's only audio that's transferring), and that would exaggerate the problem.

@rikinp93
Copy link
Author

rikinp93 commented Mar 16, 2023

Does the intro skip happen, but it's delayed and the video plays a few seconds and then it skip.

This does happen sometimes but for me it's not skipping at all until I open the screen to watch the video, then the toast comes and skips. Also, when it doesn't skip and you leave it playing it starts skipping on the next video when it shouldn't be skipping. It's definitely exaggerated a lot more in background mode. I only see this behaviour in 18+ versions of the app. 17 is perfectly fine. It's just weird it's fine in 17 and different in 18.

For example put this video in a playlist, play something before it and switch to background mode. Skip to next to play this video, the whole start does not skip until you open the app to view on screen. On 17+ version works totally fine. https://youtu.be/dZ0fwJojhrs

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Mar 17, 2023

I was able to reproduce the issue.

The problem shows up only when playing in the background without any video visible (the screen entirely off, or screen is on and video is playing in the background without picture in picture).

The problem is from the changes made to add ReturnYouTubeDislike support for Shorts. The video id hook is called, only if the video is visible. Since the video id hook is not called, SponsorBlock never loads.

Since SponsorBlock doesn't work with Shorts, the old video id patch could be brought back and used only for SponsorBlock (and use the new video id patch for everything else)

@rikinp93
Copy link
Author

rikinp93 commented Mar 19, 2023

Thanks for the fix will test once added to main

@rikinp93
Copy link
Author

Tested and looks fixed now. Thanks

@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@oSumAtrIX oSumAtrIX transferred this issue from another repository Dec 14, 2023
Slenderman00 pushed a commit to Slenderman00/revanced-patches-grindr that referenced this issue Jan 31, 2024
Slenderman00 pushed a commit to Slenderman00/revanced-patches-grindr that referenced this issue Jan 31, 2024
# [2.143.0](ReVanced/revanced-patches@v2.142.0...v2.143.0) (2022-12-14)

### Bug Fixes

* **predictive-back-gesture:** create attribute, if it does not exist ([c00e771](ReVanced/revanced-patches@8b4a5b8))

### Features

* **sleepasandroid:** remove `unlock-premium` patch ([ReVanced#1253](ReVanced/revanced-patches#1253)) ([414f503](ReVanced/revanced-patches@d56241a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants