Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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);
<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;