Skip to content

Instantly share code, notes, and snippets.

<apex:page sidebar="false" showHeader="false" standardStylesheets="false" cache="false" applyHtmlTag="false">
<html>
<head>
<style type="text/css">
.container {
max-width: 960px;
margin: 0 auto;
}
.controls{
width:75px;
@jramsahai
jramsahai / get_visitor_id.js
Created July 27, 2017 13:28
Using the Vidyard player API to grab the Vidyard visitor ID for a given viewer.
var player = new Vidyard.player(uuid);
var callback = function() {
if (!player.metadata.visitorID) { return; }
// We have a visitor ID, do things!
console.log(player.metadata.visitorID);
// If we only want this callback to execute exactly once:
callback = function() {};
};
player.on('ready', callback);
@jramsahai
jramsahai / button_selector.html
Created March 23, 2017 16:13
Button Selector
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><script>
$(function() {
$("#feedback_yes").click(function() {
$("#feedback_buttons").hide();
$("#feedback_text").hide();
$("#feedback_response").show();
$("#feedback_response").html("We're happy to help!");
setTimeout(function() { API.closeCta({ disablePlay: true }); }, 3000);
});
@jramsahai
jramsahai / cyoa_annotation.html
Created March 23, 2017 16:12
Choose Your Own Adventure
<style type="text/css">.related-videos {
position: relative;
float: left;
display: block;
overflow: auto;
padding: 20px;
padding-bottom: 0;
text-align: center;
color: #fff;
}
@jramsahai
jramsahai / dropdown_annotation.html
Created March 23, 2017 16:10
Dropdown Annotation
<style type="text/css">.navbar {
margin: 5px;
}
ul {
position: relative;
display: block;
list-style-type: none;
margin: 0;
padding: 0;
@jramsahai
jramsahai / button_annotation.html
Created March 23, 2017 16:10
Button Annotation
<style type="text/css">.whitepaper-btn-wrapper {
display: inline-block;
text-align: center;
margin: 0 auto;
padding: 10px 20px;
text-align: left;
background-color: #61c661;
border: 1.5px solid #4ebf4e;
border-radius: 2px;
box-shadow: 0 1.5px rgba(0,0,0,0.15);
@jramsahai
jramsahai / shopping_cart.html
Created March 23, 2017 16:08
Shopping Cart
<!-- <blockquote class="embedly-card" data-card-key="64e7e6b1d2ac4b3fa812d17b66e43c22" data-card-controls="0" data-card-image="http://az347637.vo.msecnd.net/3e9286d37fb94f72ba128eb8fe76d6be/Images/Products30126-445x593--1943498993.jpg" data-card-type="article"><h4><a href="http://www.laura.ca/30126-Jacquard-Printed-Pashmina-Scarf.aspx?gclid=CNusgJTPpc8CFQiqaQodAvwEoQ">Jacquard Printed Pashmina Scarf</a></h4><p>You'll love the purple accents on our classic pashmina scarf. The jacquard finish adds a chic feel for an effortless every-day essential. Imported 7030772-0859</p></blockquote><script async src="//cdn.embedly.com/widgets/platform.js" charset="UTF-8"></script> --><link href="https://fonts.googleapis.com/css?family=Oxygen" rel="stylesheet" /><style type="text/css">* {
font-family: Oxygen,Arial,"Helvetica Neue",Helvetica,sans-serif;
}
.wrapper {
margin: 10px;
}
.wrapper a {
color: blue;
@jramsahai
jramsahai / form_annotation.html
Created March 23, 2017 16:06
Form Annotations
<script>
$(function() {
$("input[type=submit]").click(function() {
API.closeCta({ disablePlay: true });
});
});
</script><style type="text/css">.newsletter-signup {
position: relative;
max-width: 600px;
margin: 0 auto;
@jramsahai
jramsahai / no_mobile.html
Created September 27, 2016 14:43
Don't render player on mobile (Courtesy of Habby)
<script>
$(function(){
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
@jramsahai
jramsahai / load_player_from_form.html
Created May 31, 2016 15:10
Here is some code that will allow you to request a Vidyard UUID which can then dynamically load the corresponding player.
<html>
<head>
<!-- please note that the following code is not designed in a responsive manner
and will need to be adjusted to accomodate if desired -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
//define function to get the embed code based on the uuid
function getEmbedCode(uuid) {
var script=document.createElement('script');
script.type='text/javascript';