Animation.playState

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

The Animation.playState read-only property is an enumerated value describing the playback state of an animation:

  • "idle", meaning that the current time of the animation is unresolved and there are no pending tasks.
  • "pending", indicating that the animation is waiting on some pending task to complete.
  • "running", meaning that the animation is running.
  • "paused", indicating that the animation was suspended and the AnimationPlayer.currentTime property is not updating.
  • "finished", indication that the animation has reached one of its boundaries and the AnimationPlayer.currentTime property is not updating.

Syntax

var currentPlayState = anAnimationPlayer.playState;

Return value

  • The current state.

Specifications

Specification Status Comment
Web Animations
The definition of 'playState' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 39.0 36 (36) [1] Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 36 (36) [1] Not supported Not supported Not supported

[1] This feature is not enabled by default, the preference dom.animations-api.core.enabled must be set to true. Before Firefox 40, this property was implemented on the AnimationPlayer interface.

See also

  • AnimationPlayer for other methods and properties you can use to control web page animation.

Document Tags and Contributors

 Contributors to this page: fscholz, teoli, jpmedley
 Last updated by: fscholz,