ReVanced / revanced-patches

đŸ§© Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.04k stars 239 forks source link

bug(YouTube - SponsorBlock): Segments not skipping when casting to tv #374

Closed bloopiy closed 2 weeks ago

bloopiy commented 11 months ago

Application

YouTube

Issue

When casting from Revanced, even if certain segments are set to automatically skip, they won't skip on TV. Not even pressing the skip button works on manual skip segments. I observed this is not the case with uYou+ on iOS, and when casting from it, sponsor segments skip as they do when viewing normally on phone. Since it works on the iOS clients, I imagine if this behavior could be implemented in Revanced.

Patch

That the existing Sponsorblock implementation is modified to work in this manner.

Motivation

Eventhough adblocking cannot be implemented on TV, it would be greatly beneficial to users who cast if at least sponsorblock segments could be automatically skipped as on phone, reducing the headache of manually moving the seekbar or repeatedly tapping on phone to skip anooyong self promotion or sponsors. I hope this feature is considered. Thanks in advance.

Acknowledgements

LisoUseInAIKyrios commented 10 months ago

I assume you're using root.

It's very likely the YT video is being played by passing a streaming url to the casted device. If so, then the video is playing ok the tv and doing its own thing and unaware of the SB segments.

If your tv supports screen mirroring, then you can try using that instead, and SB segments should skip and work correctly since everything is running on the phone.

iOS 'just works' because as far as I understand it's always using screen mirroring and not the hybrid client/mirror approach that Android uses.

oSumAtrIX commented 10 months ago

I believe you can control the progress of a casted video using the app. If SB is skipping it in the app, so it should be on the casted device, but I believe our hooks are insufficient for this.

LisoUseInAIKyrios commented 10 months ago

When you are streaming to your tv, does the manual skip button appear on your device at the correct times? It appears and disappears when the segment starts/ends?

If so, then maybe a different video seek method could be used. Because if seeking on the phone works to seek the tv, then some alternative seek method could be hooked so it works on the tv too.

Edit: basically what oSumAtrIX just said

bloopiy commented 10 months ago

I'm not rooted. Yes, the manual skip button appears at the proper times, but pressing it does nothing. I'm guessing sponsorblock is trying to skip but it can't.