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

remove requestAnimationFrame stuff, convert time ranges to {start, end} objects #832

Merged
merged 1 commit into from
Sep 10, 2017

Conversation

Rich-Harris
Copy link
Member

Follow-up to #819. Rather than using requestAnimationFrame, we're just binding to media events, which prevents unnecessary updates at 60fps.

It also converts the idiotic TimeRanges object into an array like [{start, 0, end: 42}].

This needs some additional follow-up work to reach its true potential — we need to coalesce updates that belong to the same event, and use requestAnimationFrame for played updates (but only when playing, and combined with currentTime bindings. Currently it uses timeupdate which only fires about 4 times a second). That will involve some refactoring, so I've left it out of this PR for now.

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.

1 participant