Skip to content

Instantly share code, notes, and snippets.

@nvolungis
nvolungis / gist:a3ba49076e778843c524
Last active April 21, 2023 06:21
Wistia full screen video
var fullScreenVideo = {
name: 'fullScreenVideo',
layVideo: 'fji9juvptr',
overlayVideoDiv: '#wistia_fji9juvptr',
backgroundvideo: 'z1ggfo8f86',
backgroundideoDiv: '#wistia_z1ggfo8f86',
/**
* This will call Wistia and embed the two videos
* @param None
<% cache 'nav' do %>
<div class='nav'>
<% @nav.items.each do |nav_item| %>
<li class='nav-item' data-target='<%= nav_item.href %>'>
<a href="/#<%= nav_item.href %>">
<span class="icon <%= nav_item.icon %>"></span>
<span class='nav-link'><%= nav_item.title %></span>
</a>
</li>
@nvolungis
nvolungis / gist:66a884a07555997b8d18
Created September 14, 2015 14:45
upload emails to dah newsletter via csv file
require 'open-uri'
require 'uri'
require 'csv'
booth_endpoint = "http://wistia.com/newsletter/subscribe?campaign=events&form=inbound&email="
party_endpoint = "http://wistia.com/newsletter/subscribe?campaign=events&form=inbound-party&email="
def track_emails(file, endpoint)
count = 0
@nvolungis
nvolungis / gist:eadb18d477c83358fe9a
Created September 15, 2015 16:11
Good Embed Code
<div id="wistia_agmhsklp6p" class="wistia_embed" style="width:600px;height:366px;">
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<meta itemprop="name" content="CHEERBACKS | Fundraising Ideas " />
<meta itemprop="duration" content="PT1M31S" />
<meta itemprop="thumbnailUrl" content="https://embed-ssl.wistia.com/deliveries/6fb414e10137ba54ad2f25a05fe445c1696b84d6.bin" />
<meta itemprop="contentURL" content="https://embed-ssl.wistia.com/deliveries/130522c3ef0777e60661771e84bb99beec4aa8b3.bin" />
<meta itemprop="embedURL" content="https://embed-ssl.wistia.com/flash/embed_player_v2.0.swf?2015-02-27&autoPlay=false&banner=false&controlsVisibleOnLoad=true&customColor=0ac8db&endVideoBehavior=default&fullscreenDisabled=true&mediaDuration=91.971&playButtonVisible=true&quality=&showPlayButton=true&showPlaybar=true&showVolume=true&stillUrl=https%3A%2F%2Fembed-ssl.wistia.com%2Fdeliveries%2F6fb414e10137ba54ad2f25a05fe445c1696b84d6.bin%3Fimage_crop_resized%3D600x338&unbuffere
<div id="wistia_agmhsklp6p" class="wistia_embed" style="width: 640px; height: 388px;">
<h4 style="text-align: center;">
<object id="wistia_agmhsklp6p_seo" style="display: block; height: 360px; position: relative; width: 640px;" width="300" height="198" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="https://embed-ssl.wistia.com/flash/embed_player_v2.0.swf?2015-02-27">
<param name="allowfullscreen" value="true"><param name="bgcolor" value="#000000">
<param name="wmode" value="opaque"><param name="flashvars" value="autoPlay=false&amp;banner=false&amp;controlsVisibleOnLoad=true&amp;customColor=0ac8db&amp;endVideoBehavior=default&amp;fullscreenDisabled=true&amp;mediaDuration=91.971&amp;playButtonVisible=true&amp;quality=&amp;showPlayButton=true&amp;showPlaybar=true&amp;showVolume=true&amp;stillUrl=https%3A%2F%2Fembed-ssl.wistia.com%2Fdeliveries%2F6fb414e10137ba54ad2f25a05fe445c1696b84d6.bin%3Fimage_crop_resized%3D640x360&amp;unbufferedSeek=true&
@nvolungis
nvolungis / gist:a45a59b3ba344e5bdad1
Last active September 15, 2015 18:31
Modified embed include
<script type="text/javascript">
$(document).ready(function(){
var head = document.getElementsByTagName('head')[0],
ev1Script, metaDataScript;
ev1Script = document.createElement('script');
ev1Script.src = "//fast.wistia.com/assets/external/E-v1.js";
ev1Script.type = "text/javascript";
ev1Script.charset = "ISO-8859-1";
@nvolungis
nvolungis / gist:5c232c13bd0d913075fb
Last active September 16, 2015 17:05
Julian's site
//Let's wrap this in a closure so we keep isHidden local
(function(){
var isHidden = true;
wistiaEmbedz46h62nme5.bind("secondchange", function (s) {
if(s >== 10 && isHidden) {
isHidden = false;
$('#lp-pom-button-26')
.css({'z-index':16777272})
<html>
<body>
<div id="wistia_m109px94wl" class="wistia_embed" style="width:600px;height:338px;">&nbsp;</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js"></script>
<script>
var shouldShowControls = Modernizr.touch;
wistiaEmbed = Wistia.embed("m109px94wl", {
controlsVisibleOnLoad: shouldShowControls,
describe 'VulcanTransitioner' do
it 'should accept an account' do
end
it 'should switch the vulcan flag on for all medias in the account' do
end
# init
accum = [0, 0, ... duration/bucketSize]
display = [0, 0, ... duration/bucketSize]
#when adding a worm / worm change
display = accum.map (viewCount, index) ->
return viewCount if index < worm[0], index > worm[1]
return viewCount + 1