Created
November 14, 2012 15:46
-
-
Save danscotton/4072881 to your computer and use it in GitHub Desktop.
emp init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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