ctrl-freaks / freezeframe.js

freezeframe.js is a library that pauses animated .gifs and enables them to animate on mouse hover / mouse click / touch event, or with trigger / release functions.
http://ctrl-freaks.github.io/freezeframe.js/
MIT License
1.41k stars 111 forks source link

Is it possible to play the animation a single time (no loop) ? #91

Closed danieljaguiar closed 1 year ago

danieljaguiar commented 3 years ago

I want to click in the play button and see the animation a single time. Then the animation should stop and the play button should appear again.

Basically, no loop. Is it possible?

I am using react:

<ReactFreezeframe
    src="/test.gif"
    options={{
      overlay: true,
      trigger: "click",
    }}
/>
nickforddev commented 1 year ago

No, unfortunately this is not even possible in the browser without significant caveats, it is out of scope for this library