GIF Player In Pure JavaScript – LC GIF Player

Category: Javascript | May 1, 2018
Author:LCweb-ita
Views Total:2,246 views
Official Page:Go to website
Last Update:May 1, 2018
License:MIT

Preview:

GIF Player In Pure JavaScript – LC GIF Player

Description:

The LC GIF Player library enables you to play, pause an animated GIF file just like a video player.

More features:

  • Autoplay.
  • Loading spinner.
  • Prev/next commands.
  • Fullscreen mode.

How to use it:

Embed your gif file into the document.

<div class="target example">
  <img src="" rel:animated_src="gif.gif">
</div>

Load the LC GIF Player’s JavaScript and CS files in the document.

<link href="lc_gif_player.css" rel="stylesheet">
<script src="lc_gif_player.pack.js"></script>

Create a new GIF player (no autoplay – no extra class – no prev/next commands).

lc_gif_player('.example', false, '', ['move']);

Create a new GIF player that auto-plays when the GIF is completely loaded.

// autoplay - no extra class - no fullscreen command
lc_gif_player('.example', true, '', ['fullscreen']);

You Might Be Interested In:


Leave a Reply