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

Set the progressive_load_interval_default_value to 64 KiB #8288

Conversation

litetex
Copy link
Member

@litetex litetex commented Apr 24, 2022

What is it?

  • Workaround (user facing)

Description of the changes in your PR

Set the progressive_load_interval_default_value to 64 KiB

This should workaround the problems from #8238.
#8238 (comment)

As a theoretical drawback stuttering may occur on very low bandwith connections, but I think this is negligible (also users can change it in the settings).

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@litetex litetex added bug Issue is related to a bug youtube Service, https://www.youtube.com/ labels Apr 24, 2022
@litetex litetex mentioned this pull request Apr 24, 2022
5 tasks
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@AudricV AudricV added the player Issues related to any player (main, popup and background) label Apr 24, 2022
@Stypox
Copy link
Member

Stypox commented Apr 28, 2022

I don't think this PR solves anything, see how progressive_load_interval_default_value is used here. You are basically using a different name for the default value, without changing its effect, that is, setting the default loading check interval to DEFAULT_LOADING_CHECK_INTERVAL_BYTES = 1MiB. I am opening a PR myself in a few minutes.

public static int getProgressiveLoadIntervalBytes(@NonNull final Context context) {
final String preferredIntervalBytes = getPreferences(context).getString(
context.getString(R.string.progressive_load_interval_key),
context.getString(R.string.progressive_load_interval_default_value));
if (context.getString(R.string.progressive_load_interval_default_value)
.equals(preferredIntervalBytes)) {
return ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES;
}
// Keeping the same KiB unit used by ProgressiveMediaSource
return Integer.parseInt(preferredIntervalBytes) * 1024;
}

@Stypox Stypox closed this Apr 28, 2022
@litetex litetex deleted the change-default-progressive_load_interval branch May 1, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background) youtube Service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants