Forked from jramsahai/load_inline_player_on_demand.html
Last active
August 29, 2015 14:11
-
-
Save joshorvis/3324f426cbc471c0613b to your computer and use it in GitHub Desktop.
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; | |
} | |
function changePlayer(uuid) { | |
document.getElementById("video_container").innerHTML = ""; | |
$("#video_container").append(getEmbedCode(uuid)); | |
} | |
</script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { | |
$("#video_container").append(getEmbedCode('dUY0t4jCa7QMInasnyucPg')); | |
}; | |
</script> | |
<div style="height: 400px;"> | |
<div id="video_container"></div> | |
</div> | |
<a href="javascript:void(0);" onclick="changePlayer('WWr1fWRS-Zei6Ztn1ayMsQ');">Change video</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment