Skip to content

Instantly share code, notes, and snippets.

@dmlap
Last active August 29, 2015 14:07
Show Gist options
  • Save dmlap/a20f6ebc031a1f787170 to your computer and use it in GitHub Desktop.
Save dmlap/a20f6ebc031a1f787170 to your computer and use it in GitHub Desktop.
Loading a Video Cloud video dynamically with an in-page embed.
<!doctype html>
<video
data-account="1234"
data-player="abc-123"
data-embed="default"
class="video-js" controls></video>
<script src="//players.brightcove.net/1234/abc-123_default/index.min.js"></script>
<script>
var player = videojs(document.querySelector('video'));
player.bcCatalog.getVideo('17', function(error, video) {
if (error) {
return alert('uh-oh! ' + error);
}
player.src(video.sources);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment