Closed kitsunde closed 10 years ago
This is intended behaviour, see the play method for AnimationPlayers: http://dev.w3.org/fxtf/web-animations/#methods-1
Calling play()
will restart finished players by seeking to the "beginning" of their source animation relative to the player's playback rate. This is similar to pressing play on a typical video player after the video has finished.
@alancutter It seems like reverse()
on time 0 causes the player to be finished (even when paused), is the root of my confusion. Thanks for the explanation.
Given:
It will animate as if
player.currentTime
was 2000 initially. Which seems to be different from the spec (3.5.2.3 Limiting the current time):It should probably just finish the player. Strangely if I just do
reverse()
without the 2ndplay()
nothing happens. The secondplay()
shouldn't behave this way though since the player can be paused at 0 through this pattern:Concrete JSFiddle: http://jsfiddle.net/kitsunde/WmH35/2/