1.0.0 • Published 7 years ago

ytgif v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

YTgif

YTgif is JavaScript library that let you integrate Youtube Videos as gif loop on your website easily.

How to

Just add the lib ytgif.min.js in your html and call the ytgif() function.

<script src="/ytgif.min.js"></script>
<script>
  ytgif();
</script>

To generate a gif add a div with a class ytgif with some attributes.

  • data-ytgif-id : is a the Youtube video id
  • data-ytgif-width : the width wanted
  • data-ytgif-height : the height wanted
<div
  class="ytgif"
  data-ytgif-id="wGyUP4AlZ6I"
  data-ytgif-width="1280"
  data-ytgif-height="1080">
</div>

Multiple Videos

Yeah you can add as many div as you wish !