animated GIF player with canvas support for pausing, going frame-by-frame
$ npm i gifplay-js
// import
import { GifPlay } from 'gifplay-js'
const url = 'xx.gif' // gif url
const canvas = document.querySelector('canvas') // canvas element
const player = new GifPlay(canvas, url)
// play gif
player.play()
// pause gif
player.pause()
- play
- pause
- togglePlay
- seek
- seekFrame