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(YouTube/Spoof client): selective spoofing always uses "Shorts, Clips" client (except when moving to another video) #2116

Closed
5 tasks done
kitadai31 opened this issue Jun 2, 2024 · 5 comments
Labels
Bug report Something isn't working

Comments

@kitadai31
Copy link

kitadai31 commented Jun 2, 2024

Type

Error at runtime

Tools used

RVX Manager

Application

YouTube v19.20.34

Bug description

If I open a video or live stream when no video is playing, the "Shorts, Clips" client will always be used.
The correct client will only be used if I open another video while a video is playing.

However, it seems that if the Shorts shelves has never been displayed on the screen since launching YouTube, the correct client will be used once. EDITED: This doesn't matter

screen-20240602-213043-compressed.mp4

Error logs

No response

Solution

No response

Additional context

When the wrong client is applied, the LiveStreamRendererRequester logs like this are not shown.

D/Extended: LiveStreamRendererRequester: Request took: 104ms
D/Extended: LiveStreamRendererRequester: Parsing liveStreamRenderer from response: {"playabilityStatus":{"status":"OK"},"videoDetails":{}}
D/Extended: LiveStreamRendererRequester: Failed to get videoDetails for response: {"playabilityStatus":{"status":"OK"},"videoDetails":{}}
D/Extended: LiveStreamRendererRequester: Fetched: LiveStreamRenderer{videoId=KSsMG1uzEYA, client=ANDROID_VR, playabilityOk=true, isLive=false}

Device Environment

Android 11 Google Pixel 3
Android 7.1.1 Fujitsu arrows M04

Acknowledgements

  • This issue does not reproduce on unpatched YouTube or YT Music.
  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • I have written the title and contents in English.
@kitadai31 kitadai31 added the Bug report Something isn't working label Jun 2, 2024
@inotia00
Copy link
Owner

inotia00 commented Jun 2, 2024

I think it has something to do with the Shorts shelf in the feed
Could you please turn off 'Autoplay in feed' and test again and let me know?
I can't use my phone right now

@kitadai31
Copy link
Author

Autoplay in feed is already turned off

But if I turned on it, this issue was mitigated
The correct client is used more often

@kitadai31
Copy link
Author

kitadai31 commented Jun 4, 2024

It is caused by these lines.

https://github.com/inotia00/revanced-integrations/blob/3ff66969568e7afc22bcdbdabe2ae7a3af106b38/app/src/main/java/app/revanced/integrations/youtube/patches/misc/SpoofClientPatch.java#L223-L225

I added a logging code in there and found that this code was being called before the PlayerType changed.

06-04 17:05:23.973 D/Extended: SpoofClientPatch( 7911): [playerParameterIsClipsOrShorts] isNoneOrHidden() is true.
06-04 17:05:23.974 D/Extended: SpoofClientPatch( 7911): [playerParameterIsClipsOrShorts] isNoneOrHidden() is true.
06-04 17:05:23.985 D/Extended: PlayerType( 7911): PlayerType changed to: WATCH_WHILE_SLIDING_MINIMIZED_MAXIMIZED

Therefore, playerParameterIsClipsOrShorts() always returns true when cold start the videos.

Removing the code which checks PlayerType solves this issue.
(Just checking player parameters is enough, right?)


P.S. It did not matter whether the short shelf was displayed on the screen or not.
When playing a video for the first time after launching YouTube, the PlayerType seems to change a little early.

06-04 17:26:57.119 D/Extended: SpoofClientPatch(15396): [playerParameterIsClipsOrShorts] isNoneOrHidden() is true.
06-04 17:26:57.125 D/Extended: PlayerType(15396): PlayerType changed to: WATCH_WHILE_MAXIMIZED
06-04 17:26:57.135 D/Extended: SpoofClientPatch(15396): [playerParameterIsClipsOrShorts] isNoneOrHidden() is false.

@inotia00
Copy link
Owner

reflected in revanced-patches-4.9.1-dev.1

@inotia00 inotia00 added Partially resolved Fixed in certain versions and removed Partially resolved Fixed in certain versions labels Jun 10, 2024
@inotia00
Copy link
Owner

reflected in revanced-patches-4.9.1

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