Skip to content

Instantly share code, notes, and snippets.

#fancybox-content {
border: 5px solid black !important;
}
#fancybox-outer {
padding-right: 0px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
}
<script>
// Put this somewhere after your embed.
// Update 'wemail' to your string
if (/wemail=/.test(location.href)) {
wistiaEmbed.play();
}
</script>
@jeffvincent
jeffvincent / gist:2925931
Created June 13, 2012 19:29 — forked from MaxPower15/gist:2694471
Simple pre-roll
<div id="video_container" class="wistia_embed" style="width:640px;height:272px;" data-video-width="640" data-video-height="272"> </div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/static/E-v1.js"></script>
<script>/*<![CDATA[*/
preRollEmbed = Wistia.embed("d90b54e175", {
version: "v1",
videoWidth: "640",
videoHeight: "272",
chromeless: true,
container: "video_container",
stillUrl: 'http://embed-0.wistia.com/deliveries/629013b3611293b5b3a4880570f4811b6c0db036.jpg'
Hi Chris,
Thanks very much for the question, I think this is a really good one that folks will benefit from.
In the future, we may update the API to remove the complete embed codes for each type (i.e. iframe, SEO, API, popover, etc.). But the embed codes have changed so much in the recent past that making changes to the API has not been possible (for stabilities sake).
In the meantime, what I think is best is to use a template approach, setting up the embed you want to use, and then filling in the embed using calls to the Wistia API, instead of using the embed code method in the API.
So what does an SEO & SSL embed look like? Note, I'll be using the Ruby wrapper for the API (https://github.com/wistia/wistia-api). Please excuse the crude 'string interpolation' in the template - apply whatever means work best for your approach.
<td width="300" align="center">
<a href="http://fast.wistia.com/embed/iframe/8fbea9f396?version=v1&videoWidth=700&videoHeight=394&volumeControl=true&controlsVisibleOnLoad=true&playerColor=6900B5&autoPlay=true&endVideoBehavior=reset&popover=v1" class="wistia-popover[width=700,height=394,playerColor=#6900B5,helpers.overlay.css.backgroundColor=#FFF]"><img src="http://embed.wistia.com/deliveries/4de967185c2beaa67173538910141fd58c77e9e6.jpg?image_play_button=true&image_play_button_color=6900B5e0&image_crop_resized=250x141" /></a><script charset="ISO-8859-1" src="http://fast.wistia.com/static/popover-v1.js"></script><br>
<a href="invisible-coin.html"><span style="font-weight: bold; ">Invisible Coin</span></a>
</td>
<html>
<head>
<title>berg_ch05_bbc.mp4</title>
</head>
<body>
<div id="wistia_e9fe038777" class="wistia_embed" style="width:320px;height:242px;" data-video-width="320" data-video-height="242">&nbsp;</div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/static/concat/E-v1.js"></script>
<script>/*<![CDATA[*/
wistiaEmbed = Wistia.embed("e9fe038777", {
<div id="wistia_6fd877bf42" class="wistia_embed" style="width:640px;height:360px;" data-video-width="640" data-video-height="360">&nbsp;</div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/static/concat/E-v1.js"></script>
<script>/*<![CDATA[*/
wistiaEmbed = Wistia.embed("6fd877bf42", {
version: "v1",
videoWidth: "640",
videoHeight: "360",
controlsVisibleOnLoad: true,
playerColor: "aae3d8"
});
@jeffvincent
jeffvincent / volume_at_zero.html
Created May 17, 2012 17:31
Volume Starts at Zero
<div id="wistia_897d6468f7" class="wistia_embed" style="width:640px;height:360px;" data-video-width="640" data-video-height="360">&nbsp;</div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/static/concat/E-v1.js"></script>
<script>/*<![CDATA[*/
wistiaEmbed = Wistia.embed("897d6468f7", {
version: "v1",
videoWidth: "640",
videoHeight: "360",
volumeControl: true,
controlsVisibleOnLoad: true
});
@jeffvincent
jeffvincent / autoplay_and_jump.html
Created May 16, 2012 18:36
Have a Video AutoPlay and Jump to a Specific Point in the video on Load
<div id="wistia_2aa0b2e8b0" class="wistia_embed" style="width:540px;height:304px;" data-video-width="540" data-video-height="304">&nbsp;</div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/static/concat/E-v1.js"></script>
<script>/*<![CDATA[*/
wistiaEmbed = Wistia.embed("2aa0b2e8b0", {
version: "v1",
videoWidth: "540",
videoHeight: "304",
playButton: false,
smallPlayButton: false,
playbar: false
@jeffvincent
jeffvincent / gist:2694634
Created May 14, 2012 15:40
Base action on Turnstile email entry
<script type="text/javascript">
wistiaEmbed.bind("conversion", function('pre-roll-email', val) {
//"set cookie = 1"
});
</script>