Skip to content

Instantly share code, notes, and snippets.

@ianlintner-wf
Last active December 11, 2019 16:20
Show Gist options
  • Save ianlintner-wf/5a1b5164f40773773b686d7ad080baad to your computer and use it in GitHub Desktop.
Save ianlintner-wf/5a1b5164f40773773b686d7ad080baad to your computer and use it in GitHub Desktop.
Wistia Templates for Generating IFrame
<!-- Responsive Template -->
<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:56.25% 0 28px 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_{{wistia_id}} videoFoam=true" style="height:100%;width:100%">&nbsp;</div>
</div>
</div>
import compiledVideoTemplate from "./video.handlebars";
/***
* Wistia Video Template Webpack/ES6
* See https://handlebarsjs.com/installation/integrations.html#webpack-handlebars-loader
* See https://github.com/pcardune/handlebars-loader for integrations
***/
export default function video_wistia(wistia_id) {
return $(compiledVideoTemplate({wistia_id: wistia_id}));
}
<!-- Non responsive iframe template -->
<iframe src="//fast.wistia.net/embed/iframe/{{wistia_id}}?videoFoam=true&playerColor={{player_color}}"
allowtransparency="true"
frameborder="0"
scrolling="no"
class="wistia_embed"
name="wistia_embed"
allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen
width="{{width}}" height="{{height}}"></iframe>
<script src="//fast.wistia.net/assets/external/E-v1.js" async></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment