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

allow passing speed from http plugin #621

Closed
shaharmor opened this issue Dec 5, 2016 · 1 comment
Closed

allow passing speed from http plugin #621

shaharmor opened this issue Dec 5, 2016 · 1 comment
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@shaharmor
Copy link

  • What version of Shaka Player are you using? latest

Today, the ABR mechanism is calculating its speed by calculating the total time the request took.
This is good for normal http usage, but when using an advanced http plugin that also prefetches resources ahead of time, its possible that the request coming from the player will return instantly, causing the ABR mechanism to calculate an incorrect request time, eventually messing with the calculated speed and finally the ABR decisions.

A good solution for this will be to be able to pass the desired speed it took to get the resource from the http plugin itself here: https://github.com/google/shaka-player/blob/master/lib/net/http_plugin.js#L60 and then use it later if it exists instead of using the endMs - startMs here: https://github.com/google/shaka-player/blob/master/lib/abr/simple_abr_manager.js#L207

An example for how its working in hls.js: https://github.com/dailymotion/hls.js/blob/master/src/controller/abr-controller.js#L84

Thoughts?

@joeyparrish joeyparrish added the type: enhancement New feature or request label Dec 14, 2016
@joeyparrish
Copy link
Member

I definitely see the utility of this. We could add a field to the response so that networking plugins could return this information.

We would need to change the response structure, which could easily be backward compatible. If the field is there, we use it. If not, we use timing collected by NetworkingEngine instead.

We would also need to change the AbrManager contract to take a time value instead of start and end. This would not be backward compatible, so existing AbrManager plugins would have to change.

We're already going to have to break the AbrManager interface to implement HLS (#279), so we can try to schedule this for the same release (v2.1).

@joeyparrish joeyparrish added this to the v2.1.0 milestone Dec 14, 2016
@TheModMaker TheModMaker self-assigned this Dec 19, 2016
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
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

No branches or pull requests

4 participants