Search code examples
amp-html

Pausing an amp-animation at a specific time


Is it currently possible to pause a amp-animation at a specific time?

Sample scenario:

  1. I have an animation (10s) that starts with an intro (2s).
  2. I want the animation to pause at 2s.
  3. The user can click on a button to resume the playback of that animation.

Point 1 and 3 is already working. But I am not sure how to implement point 2, If it is even possible. Any help/hint highly appreciated.


Solution

  • You would need to use two amp-animations since there is no timer in AMP to pause the animation at 2s. Have first be the intro and autoplay and second to be triggered by user action.