Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 517 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 517 Bytes

gifplay-js

animated GIF player with canvas support for pausing, going frame-by-frame

Install

$ npm i gifplay-js

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

detail docs