Skip to content

Instantly share code, notes, and snippets.

View visualforce_example.html
<apex:page sidebar="false" showHeader="false" standardStylesheets="false" cache="false" applyHtmlTag="false">
<style type="text/css">
.container {
max-width: 960px;
margin: 0 auto;
jramsahai / get_visitor_id.js
Created Jul 27, 2017
Using the Vidyard player API to grab the Vidyard visitor ID for a given viewer.
View get_visitor_id.js
var player = new Vidyard.player(uuid);
var callback = function() {
if (!player.metadata.visitorID) { return; }
// We have a visitor ID, do things!
// If we only want this callback to execute exactly once:
callback = function() {};
player.on('ready', callback);
View button_selector.html
<script src=""></script><script>
$(function() {
$("#feedback_yes").click(function() {
$("#feedback_response").html("We're happy to help!");
setTimeout(function() { API.closeCta({ disablePlay: true }); }, 3000);
jramsahai / cyoa_annotation.html
Created Mar 23, 2017
Choose Your Own Adventure
View cyoa_annotation.html
<style type="text/css">.related-videos {
position: relative;
float: left;
display: block;
overflow: auto;
padding: 20px;
padding-bottom: 0;
text-align: center;
color: #fff;
View dropdown_annotation.html
<style type="text/css">.navbar {
margin: 5px;
ul {
position: relative;
display: block;
list-style-type: none;
margin: 0;
padding: 0;
View button_annotation.html
<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);
View shopping_cart.html
<!-- <blockquote class="embedly-card" data-card-key="64e7e6b1d2ac4b3fa812d17b66e43c22" data-card-controls="0" data-card-image="" data-card-type="article"><h4><a href="">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="//" charset="UTF-8"></script> --><link href="" rel="stylesheet" /><style type="text/css">* {
font-family: Oxygen,Arial,"Helvetica Neue",Helvetica,sans-serif;
.wrapper {
margin: 10px;
.wrapper a {
color: blue;
View form_annotation.html
$(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 / no_mobile.html
Created Sep 27, 2016
Don't render player on mobile (Courtesy of Habby)
View no_mobile.html
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
iOS: function() {
jramsahai / load_player_from_form.html
Created May 31, 2016
Here is some code that will allow you to request a Vidyard UUID which can then dynamically load the corresponding player.
View load_player_from_form.html
<!-- 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=""></script>
<script type="text/javascript">
//define function to get the embed code based on the uuid
function getEmbedCode(uuid) {
var script=document.createElement('script');