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

Demo timeline chart tab #2546

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Demo timeline chart tab #2546

merged 1 commit into from
Mar 13, 2020

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Mar 5, 2020

This PR will...

Add a tab to the demo page that renders a timeline showing playlist fragments and texttrack cues for loaded levels, and tracks.

Why is this Pull Request needed?

Visualize streaming behavior, or how hls.js aligns and buffers segments and metadata.

Try it out

Open the preview build https://deploy-preview-2546--hls-js-pr.netlify.com/demo/ and click the "Timeline" button under the player:

Screen Shot 2020-03-06 at 2 08 01 PM

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 0.14.0 milestone Mar 5, 2020
Copy link
Member

@michaelcunningham19 michaelcunningham19 left a comment

Choose a reason for hiding this comment

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

This looks great 👍
Awesome job.

if (!video.readyState || video.ended) {
return 'rgba(0, 0, 0, 0.9)';
}
if (video.seeking || video.readyState < 3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think better to use HTMLVideoElement.HAVE_FUTURE_DATA instead of magic number.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I avoid references to HTMLMediaElement and it's properties in case they are tampered with or missing in legacy browsers.

@robwalch robwalch merged commit 8f1082f into master Mar 13, 2020
@robwalch robwalch deleted the feature/demo-timeline branch March 13, 2020 22:20
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.

None yet

3 participants