Last active
August 29, 2015 14:07
-
-
Save dmlap/a20f6ebc031a1f787170 to your computer and use it in GitHub Desktop.
Loading a Video Cloud video dynamically with an in-page embed.
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
<!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