MAF.control.MediaTransportOverlay

new MAF.control.MediaTransportOverlay()

Example

var player = new MAF.control.MediaTransportOverlay({
	theme: false,
	forwardseekButton: true,
	backwardseekButton: true,
	fadeTimeout: 5,
	events: {
		onTransportButtonPress: function (event) {
			var timeIndex;
      var button = event.payload.button;

			if ( button === 'forward' ) {
					event.stop();
					MAF.mediaplayer.control.seek(60);
			} else if ( button === 'rewind' ) {
					event.stop();
					timeindex = MAF.mediaplayer.player.currentTimeIndex || null;
					if (timeindex && (timeindex - (60*1000)) < 0 && MAF.mediaplayer.playlist.currentIndex > 0) {
						MAF.mediaplayer.playlist.previousEntry();
					} else if (view.visible && MAF.mediaplayer.player.currentPlayerState === MAF.mediaplayer.constants.states.PLAY) {
						MAF.mediaplayer.control.seek(-60);
					}
			} else if ( button ==='forwardseek' ) {
					event.stop();
					MAF.mediaplayer.control.forward();
			} else if ( button === 'backwardseek' ) {
					event.stop();
					timeindex = MAF.mediaplayer.player.currentTimeIndex || null;
          if (timeindex && (timeindex - (600*1000)) < 0 && MAF.mediaplayer.playlist.currentIndex > 0) {
          	MAF.mediaplayer.playlist.previousEntry();
					} else {
						MAF.mediaplayer.control.rewind();
					}
      } else if ( button === 'stop' ) {
					if (!view.frozen) {
						MAF.application.previousView();
					}
      }
		}
	}
}).appendTo(this);

Configs

backwardseekButton : {Boolean}

True if the backwardseek button should be visible. Default is false.

buttonOrder : {Array}

Order of the buttons to be shown in this component.

Example
var player = new MAF.control.MediaTransportOverlay({
   buttonOrder: ['backwardseekButton', 'rewindButton', 'playButton', 'forwardButton', 'forwardseekButton', 'stopButton', 'infoButton', 'resizeButton']
}).appendTo(this);

forwardButton : {Boolean}

True if the forward button should be visible. Default is true.

forwardseekButton : {Boolean}

True if the forwardseek button should be visible. Default is false.

infoButton : {Boolean}

True if the info button should be visible. Default is true.

playButton : {Boolean}

True if the play button should be visible. Default is true.

resizeButton : {Boolean}

True if the resize button should be visible. Default is true.

rewindButton : {Boolean}

True if the rewind button should be visible. Default is true.

stopButton : {Boolean}

True if the stop button should be visible. Default is true.

Methods

animate(config) inherited

Parameters:

NameTypeDescription
configObject

A config object

Fires:

focus() inherited

This will try and focus this component. If it cannot recieve focus, this focus will stay on the currently focused component.

freeze() → {Class} inherited

Freezes this component. Screen renders no longer trigger until thawed.

Returns:

This component.

getAbsolutePosition() → {Object} inherited

Give back the position relative to its first positioned ancestor element

Returns:

{hOffset:Number, vOffset: Number}

getView() → {Class} inherited

Returns:

Returns the view this class is appended on.

hide() → {Class} inherited

Hides this component.

Returns:

This component.

initialize() inherited

Initialize the class

show() → {Class} inherited

Shows this component.

Returns:

This component.

thaw() → {Class} inherited

Thawes this component. Screen renders can trigger again.

Returns:

This component.

Events

onAnimationEnded

Fired when a animation on this component has ended.

onAppend

Fired when component has appended to a parent. Update visual appearances by applying a Theme style and rendering the skin.

onBlur

Fired when the component is blurred.

onFocus

Fired when the component recieves focus.

onNavigate

Fired when a navigation happens when the component has focus.

onSelect

Fired when the component is selected.

onTransportButtonPress

Fired when a