Skip to content

allow passing speed from http plugin #621

Closed
@shaharmor

Description

  • 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?

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions