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

DocumentTimeline not implemented #228

Open
ysulyma opened this issue Jun 11, 2021 · 0 comments
Open

DocumentTimeline not implemented #228

ysulyma opened this issue Jun 11, 2021 · 0 comments

Comments

@ysulyma
Copy link

ysulyma commented Jun 11, 2021

I need to attach animations to a DocumentTimeline other than the default document.timeline. However, the polyfill does not implement/expose this constructor.

Use case: I have a player for "videos" made out of HTML/React. The video player has its own timeline; if an animation is attached to the video timeline with delay, say, 2000, then the animation will happen at the 2 second mark in the video. This is achieved by scheduling the animation at the corresponding future time on the actual document timeline and adjusting whenever the user seeks.

The timeline syncing code is https://github.com/ysulyma/ractive-player/blob/v2.1/src/playback.ts#L242

Minimal working example: https://ractive-player.org/r/timeline/. Press play, and "Hello World" should fade in after 2 seconds.

(Probably) separate issue: the above works correctly in Firefox and Chrome, but not in iOS 12 (which doesn't implement the Web Animations API). However, if I include 2.3.2/web-animations-next.min.js, then it stops working in Firefox and Chrome, even though they implement the Web Animations API.

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

No branches or pull requests

1 participant