How to talk to our videoplayer with javascript
Interacting with our player is slightly different from the method described on JeroenWijering.com. How you can do it is explained in this (very) short tutorial.
To get a reference to the Bits on the Run player use this code snippet:
<script language="javascript">
var player;
function playerReady(obj) {
if(navigator.appName.indexOf("Microsoft") != -1) {
player = window[obj.id];
} else {
player = document[obj.id];
}
}
</script>
Next, refer to the following page on the API implemented in the player here
This example of how to use the functions in the API documentation demonstrates how to use the PLAY command:
function foo() {
player.sendEvent('PLAY',true);
}
Comments
No comments yet.
Post your own comment
You need to have javascript enabled to post a comment!