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(Spoof Streaming Data): Performance degradation on iOS client #110

Merged
merged 11 commits into from
Dec 18, 2024

Conversation

YT-Advanced
Copy link

Apply workarounds to IOS client only

? "Unknown"
: lastSpoofedClientType.getFriendlyName();
}
private static final Map<String, ClientType> clientTypeMap = Collections.synchronizedMap(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still using two HashMaps, so it's not good in terms of performance

Copy link
Author

@YT-Advanced YT-Advanced Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The performance difference is not noticeable at all (since videoId is used as key). For more information, before this PR you were using streamingData as the map key. It causes significant delay because the map has to hash the entire byte array.

@inotia00 inotia00 changed the title fix(Spoof Streaming Data): Apply workarounds to the correct client fix(Spoof Streaming Data): Performance degradation on iOS client Dec 18, 2024
@inotia00
Copy link
Owner

Additional context

Before this PR, there was a delay of about 1 second for the video to start on iOS clients, because two HashMaps were used to find the original StreamingData

The PR fixes that

@inotia00 inotia00 merged commit 5ffbb47 into inotia00:dev Dec 18, 2024
@inotia00
Copy link
Owner

Still, there is a delay

I will also consider skipping the videoId verification to further reduce the delay

(Will be implemented as a setting)

@YT-Advanced
Copy link
Author

YT-Advanced commented Dec 18, 2024

I will also consider skipping the videoId verification to further reduce the delay

(Will be implemented as a setting)

Uhm u shouldn't do it, since the original StreamingData may be spoofed incorrectly 🫠 Just keep things as they are

@YT-Advanced YT-Advanced deleted the ios branch December 22, 2024 12:08
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.

2 participants