Skip to content

Instantly share code, notes, and snippets.

@danscotton
Created November 14, 2012 15:46
Show Gist options
  • Select an option

  • Save danscotton/4072881 to your computer and use it in GitHub Desktop.

Select an option

Save danscotton/4072881 to your computer and use it in GitHub Desktop.
emp init
var emp = new embeddedMedia.Player();
emp.setWidth(that.options.width);
emp.setHeight(that.options.height);
emp.setDomId(that.options.id);
emp.setPlaylist(that.options.playlist);
emp.setMediator({
'host': 'open.live.bbc.co.uk'
});
if (that.options.poster) {
emp.setBoilerPlateUrl(that.options.poster);
}
emp.set('uxHighlightColour', '0xcc0101');
emp.set('enable3G', true);
emp.set("showFullScreenButton", true);
emp.set('config_plugin_api_javascript', true);
emp.write();
emp.onMediaPlayerInitialised = function() {
news.pubsub.emit('video:loaded', [emp]);
emp.register('onEnterFullscreen');
emp.onEnterFullscreen = function() {
news.pubsub.emit('nav:all:close');
};
emp.register('onMediaPlaying');
emp.onMediaPlaying = function() {
news.pubsub.emit('video:playing', [emp]);
};
emp.register('onMediaPaused');
emp.onMediaPaused = function() {
news.pubsub.emit('video:pause', [emp]);
};
emp.register('onMediaCompleted');
emp.onMediaCompleted = function() {
news.pubsub.emit('video:ended', [emp]);
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment