gifplay-js
v0.1.3
Published
animated GIF player with canvas support for pausing, going frame-by-frame
Downloads
10
Readme
gifplay
animated GIF player with canvas support for pausing, going frame-by-frame
Install
$ npm i gifplay-js -S
Usage
// 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()
API
- play
- pause
- togglePlay
- seek
- seekFrame