Re: [csswg-drafts] [web-animations-1] Fixed play animation procedure for scroll animations (#2075) (#5059)

> (And the more I think about it, the more I wonder if the pending playback rate actually needs to be applied asychronously for play() anyway? I'm having trouble thinking of a scenario where it would make a difference?)

Applying pending playback rate asynchronously makes a difference when reversing or calling updatePlaybackRate() on running animation. In these cases play pending task needs both the current and pending playback rates to recalculate start time to match the current time.

```
anim.play();
...
anim.reverse(); // or anim.updatePlaybackRate(-1)
```

I was thinking more about diverging play procedure for scroll animations to call set start time. I feel like this inconsistency is "more inconsistent" than applying pending playback rate. 

How about we generalize updating playback rate asynchronously only when it's needed? In this case the condition will be:

- If _performed seek_ is true or _hold time_ is resolved,
  - Apply any pending playback rate on animation.
 

-- 
GitHub Notification of comment by ogerchikov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/5059#issuecomment-630505853 using your GitHub account

Received on Tuesday, 19 May 2020 00:33:27 UTC