Skip to content

Instantly share code, notes, and snippets.

@jramsahai
Last active January 1, 2016 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jramsahai/8183516 to your computer and use it in GitHub Desktop.
Save jramsahai/8183516 to your computer and use it in GitHub Desktop.
On occasion, we've seen instances where the Vidyard player loads before the tracking code on a MAP tagged page. Here's a solution to delay the loading of the player until after the document is loaded. This ensures that the tracking code is loaded first, allowing the player to find the cookie info.
<html>
<head></head>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type='text/javascript'>
window.onload=function() {
$("#video_container").html('<script type="text/javascript" id="vidyard_embed_code_oTDMPlUv--51Th455G5u7Q" src="//play.vidyard.com/oTDMPlUv--51Th455G5u7Q.js?v=3.1&type=inline"><\/script>');
};
</script>
<div id='video_container'>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment