Re: Temporary removal of animations

On Tue, Nov 18, 2014 at 12:39 PM, Shane Stephens <shans@google.com> wrote:

> I think this issue points to a bug in the Chrome implementation. Even
> though cancel is asynchronous, from the perspective of the main thread its
> effect on style should be immediate (or at least appear to be - calling
> cancel should invalidate the style of the element the animation is
> targeting). After all, the animation itself is observable as cancelled -
> its playState switches immediately to 'idle'. I'd like to talk it over with
> some people on my team but assuming they agree I'll file a bug on our impl.
>

As I mentioned, setting the currentTime makes changes visible immediately.
So setting the currentTime past the end has the effect I want. Infact
setting player.currentTime = player.currentTime forces the recalc style for
the cancel() case. I have attached a version of my test case that shows
these behaviours.

One question I have is what happens if I set currentTime to past the end,
then back to where it was. ie for a player with duration 1000:

  var current = player.currentTime ;
  player.currentTime = 1000000000000;
  player.currentTime = current ;

The spec seems to indicate that promises should be resolved at the time I
set the currentTime passed the end:

  http://w3c.github.io/web-animations/#set-the-current-time

This seems wrong to me.

Received on Tuesday, 18 November 2014 21:24:32 UTC