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

updatePlaybackRate #218

Open
amk221 opened this issue Feb 13, 2020 · 5 comments
Open

updatePlaybackRate #218

amk221 opened this issue Feb 13, 2020 · 5 comments

Comments

@amk221
Copy link

amk221 commented Feb 13, 2020

I use animation.playbackRate = -1 to reverse an animation mid-way through.

This has recently stopped working in Chrome, but it does work if I change it to animation.updatePlaybackRate(-1)

However, that isn't polyfilled, so I have to write code like:

if (animation.updatePlaybackRate) {
  animation.updatePlaybackRate(playbackRate);
} else {
  animation.playbackRate = playbackRate;
}
@birtles
Copy link

birtles commented Feb 14, 2020

I use animation.playbackRate = -1 to reverse an animation mid-way through.

This has recently stopped working in Chrome

Do you have a test case where this doesn't work in Chrome? I'm pretty sure it's a bug they'd like to know about it.

That said, updatePlaybackRate is preferred over setting the playbackRate since it will make sure the change happens smoothly for animations running on a separate thread/process.

@amk221
Copy link
Author

amk221 commented Feb 14, 2020

👌I haven't raised an issue yet: https://jsfiddle.net/amk221/2n60su37/

@birtles
Copy link

birtles commented Feb 14, 2020

I can reproduce the bug in Canary but not release. Do you need help filing the bug?

@amk221
Copy link
Author

amk221 commented Feb 14, 2020 via email

@birtles
Copy link

birtles commented Feb 14, 2020

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

2 participants