This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Vidyard player API script --> | |
<script src="//play.vidyard.com/v0/api.js"></script> | |
<!-- Google Analytics tracking code --> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<htmL> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function getEmbedCode(uuid) { | |
var script=document.createElement('script'); | |
script.type='text/javascript'; | |
script.id='vidyard_embed_code_'+uuid; | |
script.src='https://play.vidyard.com/'+uuid+'.js?v=3.1&type=inline'; | |
return script; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// Generate and return embed code for a given player UUID | |
function getEmbedCode(uuid) { | |
var script=document.createElement('script'); | |
script.type='text/javascript'; | |
script.id='vidyard_embed_code_'+uuid; | |
script.src='//play.vidyard.com/'+uuid+'.js?v=3.1.1&type=inline&autoplay=0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="//play.vidyard.com/v0/api.js"></script> | |
<script> | |
function httpGet(theUrl) { | |
var xmlHttp = null; | |
xmlHttp = new XMLHttpRequest(); | |
xmlHttp.open( "GET", theUrl, false ); | |
xmlHttp.send( null ); | |
return xmlHttp.responseText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<!-- Vidyard inline embed code --> | |
<script type="text/javascript" id="vidyard_embed_code_hedIuHeKRKySm1qx9xXV7w" src="//play.vidyard.com/hedIuHeKRKySm1qx9xXV7w.js?v=3.1&type=inline"></script> | |
<script src="//play.vidyard.com/v0/api.js"></script> | |
<script type="text/javascript"> | |
// Parsing the query string | |
function get_parameter_by_name(name) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
function isElementInViewport (el) { | |
//special bonus for those using jQuery | |
if (typeof jQuery === "function" && el instanceof jQuery) { | |
el = el[0]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
The code below is a page with two embedded players. The player in the div "video-1" DOES NOT have a popout CTA on it. The player in the div "video-2" DOES have a CTA on it. | |
We have used media queries to separate the CSS into two branches. They have been labeled "Desktop CSS" and "Mobile CSS" in the comments. You can see that the split occurs when the screen width dips below 972px. | |
This is calculated by taking the maximum width of your player and adding enough pixels to cover the width of your CTA. By default this is 331px, which accounts for 300px plus a 31px border. In our example, the player is 640px so 640+331=971px. | |
*** You will likely need to change the value of 972px in BOTH media queries to accommodate the dimensions and layout of your page. Again, this should be the maximum width of your player + the width of your CTA *** | |
Your page must allow sufficient space in the iframe for both the player and the popout CTA when the CTA enabled player is visible. | |
I have done my best to comment the relevant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** | |
Purpose: | |
This code detects all inline embedded Vidyard players on a page and sets up the necessary event | |
listeners allowing you to execute code on the standard Vidyard player API events such as play, | |
pause, ready, etc. The script will also calculate when 0, 25, 50, 75 and 99 percent of a chapter | |
has been viewed and allow you to execute code at these points. | |
Usage: | |
This script should be included below the Vidyard API, web analytics tracking code (if applicable) and | |
all Vidyard embedded players. You can use the following line example to include it: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
#innerContainer { | |
position: relative; | |
display: block; | |
width: 100% !important; | |
height: 0; | |
padding: 56.25% 0 0 0; /* This should reflect your video aspect ratio */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
#innerContainer { | |
position: relative; | |
display: block; | |
width: 100% !important; | |
height: 0; | |
padding: 56.25% 0 0 0; /* This should reflect your video aspect ratio */ | |
} |