Packagecom.distriqt.extension.mediaplayer
Classpublic class MediaPlayerOptions
InheritanceMediaPlayerOptions Inheritance Object

Provides options controlling the settings of the media player.



Public Properties
 PropertyDefined By
  autoPlay : Boolean = false
Whether the player should start playing the media as soon as the media is ready (default: false)
MediaPlayerOptions
  backgroundAudioAllowed : Boolean = false
Enables background audio mode on the device.
MediaPlayerOptions
  backgroundColour : uint = 0xFF000000
The background colour of the player
MediaPlayerOptions
  backgroundColourInt : int
[read-only]
MediaPlayerOptions
  controls : String = controls:embedded
Deprecated: Deprecated
The type of native controls to display.
MediaPlayerOptions
  controlsEnabled : Boolean = true
If true the player will display user controls to control playback.
MediaPlayerOptions
  remoteControlEventsEnabled : Boolean = false
MediaPlayerOptions
  viewport : Rectangle
Set the initial viewport (or size) of the player in screen pixel coordinates.
MediaPlayerOptions
  viewportAutoScale : Boolean = false
When true the player position and size will be scaled appropriately.
MediaPlayerOptions
Public Methods
 MethodDefined By
  
MediaPlayerOptions(viewport:Rectangle = null)
Constructor
MediaPlayerOptions
  
MediaPlayerOptions
  
MediaPlayerOptions
  
setAutoPlay(autoPlay:Boolean = true):MediaPlayerOptions
MediaPlayerOptions
  
MediaPlayerOptions
  
setViewport(viewport:Rectangle):MediaPlayerOptions
MediaPlayerOptions
  
showControls(enable:Boolean = true):MediaPlayerOptions
MediaPlayerOptions
Public Constants
 ConstantDefined By
  CONTROLS_BASIC : String = controls:basic
Deprecated: Deprecated
[static] Basic controls are displayed.
MediaPlayerOptions
  CONTROLS_EMBEDDED : String = controls:embedded
Deprecated: Deprecated
[static] Controls for an embedded view are displayed.
MediaPlayerOptions
  CONTROLS_FULLSCREEN : String = controls:fullscreen
Deprecated: Deprecated
[static] Controls for fullscreen playback are displayed.
MediaPlayerOptions
  CONTROLS_NONE : String = controls:none
Deprecated: Deprecated
[static] No controls are displayed.
MediaPlayerOptions
Property Detail
autoPlayproperty
public var autoPlay:Boolean = false

Whether the player should start playing the media as soon as the media is ready (default: false)

backgroundAudioAllowedproperty 
public var backgroundAudioAllowed:Boolean = false

Enables background audio mode on the device.

iOS Only

Experimental Not yet fully supported

backgroundColourproperty 
public var backgroundColour:uint = 0xFF000000

The background colour of the player

backgroundColourIntproperty 
backgroundColourInt:int  [read-only]


Implementation
    public function get backgroundColourInt():int
controlsproperty 
public var controls:String = controls:embedded
Deprecated: Deprecated

The type of native controls to display. See MediaPlayerOptions.CONTROLS_(default: CONTROLS_EMBEDDED)

controlsEnabledproperty 
public var controlsEnabled:Boolean = true

If true the player will display user controls to control playback.

remoteControlEventsEnabledproperty 
public var remoteControlEventsEnabled:Boolean = false

viewportproperty 
public var viewport:Rectangle

Set the initial viewport (or size) of the player in screen pixel coordinates. The x,y values indicate the position of the top left of the player and the width and height represent the width and height of the player window.

viewportAutoScaleproperty 
public var viewportAutoScale:Boolean = false

When true the player position and size will be scaled appropriately. This is useful when developing a non-retina supported application, all positions and sizes will be scaled to match the application. (default: false) This is an iOS only property

Constructor Detail
MediaPlayerOptions()Constructor
public function MediaPlayerOptions(viewport:Rectangle = null)

Constructor

Parameters
viewport:Rectangle (default = null)
Method Detail
enableBackgroundAudio()method
public function enableBackgroundAudio(enabled:Boolean = true):MediaPlayerOptions

Parameters

enabled:Boolean (default = true)

Returns
MediaPlayerOptions
enableRemoteControlEvents()method 
public function enableRemoteControlEvents(enabled:Boolean = true):MediaPlayerOptions

Parameters

enabled:Boolean (default = true)

Returns
MediaPlayerOptions
setAutoPlay()method 
public function setAutoPlay(autoPlay:Boolean = true):MediaPlayerOptions

Parameters

autoPlay:Boolean (default = true)

Returns
MediaPlayerOptions
setBackgroundColour()method 
public function setBackgroundColour(colour:int):MediaPlayerOptions

Parameters

colour:int

Returns
MediaPlayerOptions
setViewport()method 
public function setViewport(viewport:Rectangle):MediaPlayerOptions

Parameters

viewport:Rectangle

Returns
MediaPlayerOptions
showControls()method 
public function showControls(enable:Boolean = true):MediaPlayerOptions

Parameters

enable:Boolean (default = true)

Returns
MediaPlayerOptions
Constant Detail
CONTROLS_BASICConstant
public static const CONTROLS_BASIC:String = controls:basic
Deprecated: Deprecated

Basic controls are displayed. The controls include a start/pause button and a scrubber bar.

Android only: on iOS this displays the same as CONTROLS_EMBEDDED

See also

CONTROLS_EMBEDDEDConstant 
public static const CONTROLS_EMBEDDED:String = controls:embedded
Deprecated: Deprecated

Controls for an embedded view are displayed. The controls include a start/pause button, a scrubber bar, and a button for toggling between fullscreen and embedded display modes.

CONTROLS_FULLSCREENConstant 
public static const CONTROLS_FULLSCREEN:String = controls:fullscreen
Deprecated: Deprecated

Controls for fullscreen playback are displayed. The controls include a start/pause button, a scrubber bar, forward and reverse seeking buttons, a button for toggling between fullscreen and embedded display modes, a button for toggling the aspect fill mode, and a Done button. Tapping the done button pauses the video and exits fullscreen mode.

CONTROLS_NONEConstant 
public static const CONTROLS_NONE:String = controls:none
Deprecated: Deprecated

No controls are displayed.