Skip to content

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