Package | com.distriqt.extension.mediaplayer |
Class | public class MediaPlayerOptions |
Inheritance | MediaPlayerOptions ![]() |
Provides options controlling the settings of the media player.
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
MediaPlayerOptions(viewport:Rectangle = null)
Constructor
| MediaPlayerOptions | ||
enableBackgroundAudio(enabled:Boolean = true):MediaPlayerOptions | MediaPlayerOptions | ||
enableRemoteControlEvents(enabled:Boolean = true):MediaPlayerOptions | MediaPlayerOptions | ||
setAutoPlay(autoPlay:Boolean = true):MediaPlayerOptions | MediaPlayerOptions | ||
setBackgroundColour(colour:int):MediaPlayerOptions | MediaPlayerOptions | ||
setViewport(viewport:Rectangle):MediaPlayerOptions | MediaPlayerOptions | ||
showControls(enable:Boolean = true):MediaPlayerOptions | MediaPlayerOptions |
Constant | Defined 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 |
autoPlay | property |
public var autoPlay:Boolean = false
Whether the player should start playing the media as soon as the media is ready (default: false)
backgroundAudioAllowed | property |
public var backgroundAudioAllowed:Boolean = false
Enables background audio mode on the device.
iOS Only
Experimental Not yet fully supported
backgroundColour | property |
public var backgroundColour:uint = 0xFF000000
The background colour of the player
backgroundColourInt | property |
backgroundColourInt:int
[read-only] public function get backgroundColourInt():int
controls | property |
public var controls:String = controls:embedded
The type of native controls to display. See MediaPlayerOptions.CONTROLS_(default: CONTROLS_EMBEDDED)
controlsEnabled | property |
public var controlsEnabled:Boolean = true
If true
the player will display user controls to control playback.
remoteControlEventsEnabled | property |
public var remoteControlEventsEnabled:Boolean = false
viewport | property |
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.
viewportAutoScale | property |
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
MediaPlayerOptions | () | Constructor |
public function MediaPlayerOptions(viewport:Rectangle = null)
Constructor
Parametersviewport:Rectangle (default = null )
|
enableBackgroundAudio | () | method |
public function enableBackgroundAudio(enabled:Boolean = true):MediaPlayerOptions
Parameters
enabled:Boolean (default = true )
|
MediaPlayerOptions |
enableRemoteControlEvents | () | method |
public function enableRemoteControlEvents(enabled:Boolean = true):MediaPlayerOptions
Parameters
enabled:Boolean (default = true )
|
MediaPlayerOptions |
setAutoPlay | () | method |
public function setAutoPlay(autoPlay:Boolean = true):MediaPlayerOptions
Parameters
autoPlay:Boolean (default = true )
|
MediaPlayerOptions |
setBackgroundColour | () | method |
public function setBackgroundColour(colour:int):MediaPlayerOptions
Parameters
colour:int |
MediaPlayerOptions |
setViewport | () | method |
public function setViewport(viewport:Rectangle):MediaPlayerOptions
Parameters
viewport:Rectangle |
MediaPlayerOptions |
showControls | () | method |
public function showControls(enable:Boolean = true):MediaPlayerOptions
Parameters
enable:Boolean (default = true )
|
MediaPlayerOptions |
CONTROLS_BASIC | Constant |
public static const CONTROLS_BASIC:String = controls:basic
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_EMBEDDED | Constant |
public static const CONTROLS_EMBEDDED:String = controls:embedded
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_FULLSCREEN | Constant |
public static const CONTROLS_FULLSCREEN:String = controls:fullscreen
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_NONE | Constant |
public static const CONTROLS_NONE:String = controls:none
No controls are displayed.