SuperGif
SuperGif, published as libgif-js, is an open-source JavaScript library that takes control of an animated GIF. It parses the file and drives playback in a canvas, so a page can start, stop and restart an animation that the browser would otherwise play on its own terms and never hand back.
Documented at https://github.com/buzzfeed/libgif-js.
How We've Used It
One gated build uses it: a merchandiser-authored carousel whose slides mix images, hosted video and GIFs. A GIF looping in a slide nobody is looking at is animation nobody asked for, so playback is bound to the slide's state — and that binding is only possible because the library exposes a handle a plain image element does not. Slides that carry no GIF never load it, which keeps the cost of the library proportional to how the merchandiser actually filled the section in.
Builds Using It
No page in this batch covers a build on it yet. One gated build uses it; its page follows.
Related Entities
Our Role
Integration. We initialize the library against the slides that need it; the library is open source and stays as published.