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

Low latency catch up #2605

Merged

Conversation

aescarcha
Copy link
Contributor

Checking the buffer level and target live delay, if it's behind the playback rate will be increased by 5% by default, configurable from 0% to 20%

Fixes #2600

}

function needToCatchUp() {
if (playbackController.getIsDynamic() && streamProcessor.getType() === 'video') {
Copy link
Contributor

Choose a reason for hiding this comment

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

This implies that only video content will ever be sped up?

Whilst some audio content will be particularly sensitive to playback rate, it should be up to the content provider to determine whether or not to apply speed up to a particular stream type (and the appropriate rate if any).

The usual example of low latency is hearing your neighbours celebrating a goal through the wall. This applies equally to sports audio services.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I added that check in a first approach, I think it can be removed now

@davemevans
Copy link
Contributor

Worth noting that, whilst this solves the request in #2600, if a device does not support playbackRate to anything other than 1.0 (ie actually playing faster), the player will remain in catch up state forever.

@aescarcha
Copy link
Contributor Author

aescarcha commented Jun 1, 2018

@bbcrddave how can we check if a device supports changing playbackRate ? Will it throw an exception? AFAIK it's compatible with every browser

@davemevans
Copy link
Contributor

Sure, every browser will let you set and get playbackRate and most will play back at or around the rate that you specify. Some devices, unfortunately, will fail to play back at the rate set, and won't throw an exception.

There's not much you can do but the comment wasn't against merging this PR as is, it was simply to point out that changing the playback rate may need to be supplemented with some other catch up mode (eg seek) for some devices.

@aescarcha
Copy link
Contributor Author

aescarcha commented Jun 7, 2018

Changed the approach in 7c9cba3, now we won't check buffer, but getCurrentLiveLatency, this way the event fires less often and won't be affected by track changes.

@epiclabsDASH epiclabsDASH merged commit 9b69ae2 into Dash-Industry-Forum:development Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants