← Back to release summary

Animation.updatePlaybackRate

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 76)
Intent stage
Evaluate readiness to ship

Summary

Animation.updatePlaybackRate() lets you seamlessly transition the playback rate of an animation such that there is no visible jump in the animation. Current time is preserved at the instance the new playback rate takes effect.

Motivation

Animation.updatePlaybackRate() provides a means of ensuring that a change in playback rate results in a smooth transition. Current time is preserved at the moment the new playback rate takes effect. This method is presently available on Firefox and under development for Safari. Adding support in Chrome ensures consistency across browsers.

Standards & signals

Docs: https://drafts.csswg.org/web-animations/#the-animation-interface https://drafts.csswg.org/web-animations/#seamlessly-updating-the-playback-rate-of-an-animation

Samples: https://wpt.fyi/results/web-animations/interfaces/Animation/idlharness.window.html?label=master https://wpt.fyi/results/web-animations/timing-model/animations/seamlessly-updating-the-playback-rate-of-an-animation.html?label=master

Explainers: https://developer.mozilla.org/en-US/docs/Web/API/Animation/updatePlaybackRate

View on chromestatus.com