Play Twitch video with HTML5 Gallery


HTML5 Gallery


I am trying to use the HTML5Gallery and I see you have Vimeo and YouTube. I wonder how can I play Twitch video in HTML5 Gallery?


1. In the Twitch video player page, click the Share button, copy the code from the "Embed Video" text box.

2. From the "Embed Share" text, copy the src attribute value of the iframe. It will have a format like

3. When adding the Twitch video the gallery, add a data attribute data-mediatype=12 to the <a> tag.

A demo code snippet is as follows:

<div style="display:none;" class="html5gallery" data-skin="gallery" data-width="480" data-height="272">
  <!-- Add Twitch video to Gallery -->
  <a href="" data-mediatype=12><img src="" alt="Twitch Video"></a>

  <!-- Add Youtube video to Gallery -->
  <a href=""><img src="" alt="Youtube Video"></a>