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

Throttle final playlist reloads when using DASH #277

Merged
merged 3 commits into from
Nov 7, 2018

Conversation

gesinger
Copy link
Contributor

Description

HLS already throttles reloads of the final playlist, however, DASH does not. This adds the throttling behavior to the DASH playlist loader.

To see the behavior:

  1. Go to https://videojs.github.io/http-streaming/
  2. Enter the source as: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd and the mime type as: application/dash+xml
  3. Click play
  4. Open the console and go to the network tab
  5. Click "Offline"

The failed requests will shoot up as fast as can be processed (since the retries are immediate).

The fix makes it so that retries are only made at half the target duration.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

Copy link
Contributor

@ldayananda ldayananda left a comment

Choose a reason for hiding this comment

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

Looks good overall. I think it might make sense to lift this logic to MPC since isFinalRendition is defined there too. But, that can be done in a follow up PR.

test/dash-playlist-loader.test.js Show resolved Hide resolved
@gesinger gesinger merged commit 1c2887a into videojs:master Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants