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

fix(YouTube - Client spoof): Spoof iOS client model to fix various side effects #3220

Merged
merged 6 commits into from
May 23, 2024

Conversation

oSumAtrIX
Copy link
Member

@oSumAtrIX oSumAtrIX commented May 22, 2024

RE: ReVanced/revanced-integrations#638

This PR also changes the default client spoof to iOS, as the only side effect known now is that HDR is not working.

…de effects

This commit also changes the default client spoof to iOS as the only side-effect known now, is HDR not working.
@oSumAtrIX oSumAtrIX linked an issue May 22, 2024 that may be closed by this pull request
23 tasks
@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented May 23, 2024

Captions menu is now fix, but the speed menu is still missing.

#3197 can be fixed up to solve the playback speed issue.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the base branch from main to dev May 23, 2024 07:48
@zainarbani
Copy link

Is user-agent also spoofed as iOS client?

@oSumAtrIX
Copy link
Member Author

No

@Pamilg8
Copy link

Pamilg8 commented May 23, 2024

YouTube default playback speed button can't be fixed?

@LisoUseInAIKyrios
Copy link
Contributor

Playback speed is not fixed with this PR.

Speed menu can be fixed by improving pr #3197

@Pamilg8

This comment was marked as resolved.

@zainarbani
Copy link

No

Screenshot_2024-05-23-19-23-22-806_com rhmsoft edit pro
Screenshot_2024-05-23-19-23-15-319_com termux

Could possibly related?

@oSumAtrIX
Copy link
Member Author

Good find for HDR. It may bring back the playback speed menu entry given that iOS clients are supposed to have one to begin with.

@zainarbani
Copy link

Good find for HDR. It may bring back the playback speed menu entry given that iOS clients are supposed to have one to begin with.

Sorry but i've no idea to work/try with bytecode xD

@oSumAtrIX
Copy link
Member Author

I tried spoofing the user agent, but the playback speed menu entry was still missing. I couldn't test HDR yet, though.

@zainarbani
Copy link

Can you push the test commit? I'll try

@oSumAtrIX
Copy link
Member Author

I tested it locally with a proxy, no code changes

@0xrxL
Copy link

0xrxL commented May 23, 2024

There's another issue with iOS spoof: you can't listen a live stream video in background.

@zainarbani
Copy link

I tested it locally with a proxy, no code changes

Which user-agent did you use btw?

@Pamilg8
Copy link

Pamilg8 commented May 23, 2024

I think this PR will have to wait a bit. There seems to be a lot of bugs

@LisoUseInAIKyrios
Copy link
Contributor

I think this PR will have to wait a bit. There seems to be a lot of bugs

This PR is an improvement compared to the existing spoofing strategy

@0xrxL
Copy link

0xrxL commented May 23, 2024

I think this PR will have to wait a bit. There seems to be a lot of bugs

Nah...not a lot, just few (luckily):

  • Bugged background live stream.
  • [Fixed with user-agent?] Missing HDR
  • [Fixed with this PR] Missing 60fps
  • Slow initial playback for some videos (I can reproduce this).
  • [Eventually bypassed with another PR] Missing speed flyout menu.

It's just a matter of time before reaching 100% reliability.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented May 23, 2024

Slow initial playback for some videos (I can reproduce this).

Just for reference, that was probably caused by the test suite spoof fetching the seekbar thumbnails (which blocks playback until the thumbnail storyboard is fetched). iOS spoof already has thumbnails so there should be no extra delay.

@0xrxL
Copy link

0xrxL commented May 23, 2024

Slow initial playback for some videos (I can reproduce this).

Just for reference, that was probably caused by the test suite spoof fetching the seekbar thumbnails (which blocks playback until the thumbnail storyboard is fetched). iOS spoof already has thumbnails so there should be no extra delay.

It's a bit weird, because I can reproduce this only with ios spoof enabled.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented May 23, 2024

Playback speed menu is fixed if the client is spoofed to iOS embedded:

IOS(39, "iPhone16,2", "2.4")

Captions is also present, but quality appears to be capped at 720p and player swipe gestures does not work. Probably other stuff is broken too.

@LisoUseInAIKyrios
Copy link
Contributor

Playback speed menu is also fixed if the client is spoofed to Android VR (client 28, version "1.37").

All video resolutions appear to be present (I can't tell if HDR is working or not). Audio only playback of livestreams works.

Only thing I found that doesn't work is player swipe gestures.

Not sure if playback is broken or not, as I've never had that issue.

@0xrxL
Copy link

0xrxL commented May 23, 2024

Playback speed menu is also fixed if the client is spoofed to Android VR (client 28, version "1.37").

All video resolutions appear to be present (I can't tell if HDR is working or not). Audio only playback of livestreams works.

Only thing I found that doesn't work is player swipe gestures.

Not sure if playback is broken or not, as I've never had that issue.

Try this for HDR:

https://youtu.be/njX2bu-_Vw4

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented May 23, 2024

Try this for HDR:

https://youtu.be/njX2bu-_Vw4

HDR is not present with android vr, at least not without additional changes. I did not try changing the client device name since I can't seem to find what the name should be. Edit: the model appears to be Quest, but setting this did not change anything.

Just noticed an odd bug though, where if playback is paused it will randomly resume playback (including if the app is paused in the background). This doesn't show up with any other client I tried.

Some of the other iOS and Android clients also worked, but all that I tried were capped at 720p.

@zainarbani
Copy link

Playback speed seems doesn't exist on iOS client.

Screenshot_2024-05-23-22-34-14-792_com termux-edit

@zainarbani
Copy link

I wonder what happens with streamData patch approach?

@0xrxL
Copy link

0xrxL commented May 23, 2024

Try this for HDR:
https://youtu.be/njX2bu-_Vw4

HDR is not present with android vr, at least not without additional changes. I did not try changing the client device name since I can't seem to find what the name should be. Edit: the model appears to be Quest, but setting this did not change anything.

Just noticed an odd bug though, where if playback is paused it will randomly resume playback (including if the app is paused in the background). This doesn't show up with any other client I tried.

Some of the other iOS and Android clients also worked, but all that I tried were capped at 720p.

Have you tried with this?

Screenshot_20240523_191816_Samsung Internet Beta

@LisoUseInAIKyrios
Copy link
Contributor

Have you tried with this?

Very mostly broken. Incognito fails. Non incognito playback starts with a weird brief popup that looks bizarrely like html 1.0 (even though that makes no sense). no high resolution video.

@0xrxL
Copy link

0xrxL commented May 23, 2024

Have you tried with this?

Very mostly broken. Incognito fails. Non incognito playback starts with a weird brief popup that looks bizarrely like html 1.0 (even though that makes no sense). no high resolution video.

Ok, so it can be possible to rely only on few clients, if the point is to limiting the bugs.

...and i'm afraid that HDR can't be fixed, because inotia00 said me that codec to correctly decode this videos type is missing in the android package.

@MarcaDian
Copy link
Contributor

MarcaDian commented May 23, 2024

It would be better if the option to manually enter ID/ClientName/Version was added in the settings, it would help in tests, and maybe some flexibility.

@oSumAtrIX oSumAtrIX merged commit 9b5f4ce into dev May 23, 2024
2 checks passed
@oSumAtrIX oSumAtrIX deleted the fix/spoof-side-effects branch May 23, 2024 20:42
revanced-bot pushed a commit that referenced this pull request May 23, 2024
## [4.8.2-dev.1](v4.8.1...v4.8.2-dev.1) (2024-05-23)

### Bug Fixes

* **YouTube - Client spoof:** Spoof iOS client model to fix various side effects ([#3220](#3220)) ([9b5f4ce](9b5f4ce))
revanced-bot pushed a commit that referenced this pull request May 24, 2024
## [4.8.2](v4.8.1...v4.8.2) (2024-05-24)

### Bug Fixes

* **YouTube - Client spoof:** Spoof iOS client model to fix various side effects ([#3220](#3220)) ([9b5f4ce](9b5f4ce))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request May 24, 2024
## [4.8.2](v4.8.1...v4.8.2) (2024-05-24)

### Bug Fixes

* **YouTube - Client spoof:** Spoof iOS client model to fix various side effects ([ReVanced#3220](https://github.com/E85Addict/revanced-patches/issues/3220)) ([9b5f4ce](9b5f4ce))

### Performance Improvements

* Personal Logo && Add upstream sync ([8891aec](8891aec))
@Pamilg8
Copy link

Pamilg8 commented May 24, 2024

it seems that the string has not been updated. When the iOS client is opened, it is shown that there are side effects.

@Edgars-Cirulis

This comment was marked as spam.

@Tokudas

This comment was marked as spam.

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

Successfully merging this pull request may close these issues.

bug(YouTube): Spoof client patch - various side effects
9 participants