To use TOP, implement the following:
Add the following to your html page:
TOP library)<html>
<head></head>
<body>
<div id="myVideoContainer">
<!-- player will be attached here -->
</div>
<script src="//turnip.cdn.turner.com/top/core/1.2.1/default/top.sdk.min.js"></script>
</body>
</html>Create and initialize the player, listen for the playerReady event, and play content once it has fired (see examples):
var player = TOP.createAndInitPlayer({
element: document.getElementById('myVideoContainer'),
events: {
playerReady : function(result) {
this.play('//httpstream.ngtv.io/test/content/mp4/adultswim.mp4');
}
}
});