Skip to content

Instantly share code, notes, and snippets.

@singh1469
Last active August 29, 2015 14:14
Show Gist options
  • Save singh1469/7eac303d04ae719e5950 to your computer and use it in GitHub Desktop.
Save singh1469/7eac303d04ae719e5950 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
</head>
<h3>Lukkien</h3>
<p>
<h4>Sample video</h4>
<div class="video" id="buto_12345"></div>
<script type="text/javascript">
(function(d, config) {
var script = d.createElement("script");
script.setAttribute("async", true);
var data = JSON.stringify(config);
script.src = "//js.buto.tv/video/" + data + "/akita";
var s = d.getElementsByTagName("script")[0];
s.parentNode.insertBefore(script, s)
})(document, {"object_id":"12345", "element_id": "buto_12345", "width":"500px", "height":"300px"})
</script>
<script>
var player;
var element = document.getElementById('buto_12345');
element.addEventListener('playerReady', function(e){
player = Akita.playerInstances[this.getAttribute('data-instance-id')];
player.eventEmitter.on('ended',function(e){
console.log('ended event captured');
});
//access bitrate
console.log("bitrate is " + player.bitrate);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment