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

Take into account the playbackRate in bandwidth calculations #2329

Merged
merged 5 commits into from
Jan 31, 2020

Conversation

avelad
Copy link
Member

@avelad avelad commented Jan 7, 2020

Resolves #812

@avelad
Copy link
Member Author

avelad commented Jan 8, 2020

@joeyparrish Can you review it again?

@@ -2791,6 +2791,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
this.playRateController_.set(rate);

if (this.loadMode_ == shaka.Player.LoadMode.MEDIA_SOURCE) {
this.abrManager_.playbackRateChanged(rate);
Copy link
Member

Choose a reason for hiding this comment

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

Since you added a method to a plugin interface, you'll need to account for backward compatibility. I see two good options:

  1. Check for playbackRateChange each time before calling it.
  2. When this.abrManager_ is set, check for playbackRateChange at that time and attach an empty function if it's missing.

I would strongly prefer #2, because you can then use shaka.Deprecate.deprecateFeature at the same time to tell the app developer that they need to upgrade their plugin by v2.7.

Copy link
Member Author

Choose a reason for hiding this comment

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

I add a check for playbackRateChanged and I followed your second option. Thanks!

@avelad
Copy link
Member Author

avelad commented Jan 9, 2020

@joeyparrish Can you review it again?

@avelad
Copy link
Member Author

avelad commented Jan 27, 2020

Up!

@ismena
Copy link
Contributor

ismena commented Jan 27, 2020

@avelad Let me nag Joey in person on your behalf (:

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

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

Looks great otherwise! Thanks!

@shaka-bot
Copy link
Collaborator

All tests passed!

@avelad
Copy link
Member Author

avelad commented Jan 28, 2020

I fixed the comment.

@avelad
Copy link
Member Author

avelad commented Jan 31, 2020

@joeyparrish , Is the last change enough?

@joeyparrish
Copy link
Member

Looks great, thanks!

We very much appreciate the time you take to send PRs. I know they take a long time to review because of time zones and missed emails, so we're also grateful for your patience in the review process.

@joeyparrish joeyparrish merged commit 02db99f into shaka-project:master Jan 31, 2020
@joeyparrish joeyparrish added the type: enhancement New feature or request label Jan 31, 2020
@avelad avelad deleted the playbackRate-bandwidth branch February 3, 2020 13:19
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account for playbackRate in bandwidth calculations
5 participants