Skip to content

Instantly share code, notes, and snippets.

@maracuja
Created December 10, 2013 14:16
Show Gist options
  • Save maracuja/7891215 to your computer and use it in GitHub Desktop.
Save maracuja/7891215 to your computer and use it in GitHub Desktop.
This is for when I have to come back and integrate custom analytics into my ooyala player
var debug = {};
OO.ready(function() {
OO.Player.create(
'ooyalaplayer',
'{{ request.GET.ocid }}',
{
"enableChannels": true,
"wmode" : "transparent",
onCreate: function(player) {
console.log('hi');
debug = player;
player.subscribe(OO.EVENTS.PLAYBACK_READY, 'something', function() {
console.log("Ready for playback!");
});
player.subscribe(OO.EVENTS.PLAYING, 'something', function() {
console.log("ZOMG PLAYING!");
});
}
}
);
// debug.subscribe(OO.EVENTS.PLAYBACK_READY, 'something', function() {
// console.log("Ready for playback!");
// });
// debug.subscribe(OO.EVENTS.PLAY, 'something', function() {
// console.log("ZOMG PLAYING!");
// });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment