Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joshorvis/5b6aeb3ee8a17e3cc629 to your computer and use it in GitHub Desktop.
Save joshorvis/5b6aeb3ee8a17e3cc629 to your computer and use it in GitHub Desktop.
<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;
}
function changePlayer(modalid,uuid) {
document.getElementById(modalid).innerHTML = "";
$("#"+modalid).append(getEmbedCode(uuid));
}
</script>
</head>
<body>
<div style="height: 360px;">
<div id="video_container01"></div>
<div id="video_container02"></div>
</div>
<a href="javascript:void(0);" onclick="changePlayer('video_container01','WWr1fWRS-Zei6Ztn1ayMsQ');">Change video</a>
<a href="javascript:void(0);" onclick="changePlayer('video_container02','dUY0t4jCa7QMInasnyucPg');">Change video</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment