All Implemented Interfaces
The MediaDisplay control lets media be streamed into an application without a supporting user interface. You can use this control with video and audio data. The user of your application has no control over the media when you use the MediaDisplay control by itself.
MXML Syntax
The <mx:MediacDisplay> tag inherits all the properties of its parent classes, and the following properties:
<mx:MediaDisplay
aspectRatio="true|false"
associatedController="No default."
autoPlay="true|false"
autoSize="false|true"
contentPath="No default.
cuePoints="No default."
fps="30"
playing="true|false"
volume="75"
change = "Event handler. No default."
complete = "Event handler. No default."
cuePoint = "Event handler. No default."
progress = "Event handler. No default."
/>
| Constructors | |
MediaDisplay
()
Constructor |
|
| Methods | |
| addCuePoint(aName:String, aTime:Number) : Void
Adds a new cue point to the display instance. |
| addCuePointObject(aCuePoint:CuePoint) : Void
Adds a cue point. |
| associateController(c:MediaController) : Void
Associates this display with a controller. |
| getCuePoint(pointName:String) : CuePoint
Returns a cue point object. |
| getCuePoints() : Array
Gets the Array of CuePoint objects that includes all the cue points associated with this object. |
| handleEvent(ev:Object) : Void
Listens to events from the controller. |
| handlePlayer(player:IPlayer, status:String) : Void
Handles events that are broadcast by the player implementation. |
| measure() : Void
Measures the display and sets the preferred sizes. |
| pause() : Void
Pauses playback of the media without moving the playhead. |
| play(startingPoint:Number) : Void
Plays the media starting at the specified starting point. |
| removeAllCuePoints() : Void
Deletes all the cue points associated with a given control. |
| removeCuePoint(aCuePoint:CuePoint) : Void
Deletes a specified cue point associated with a given control. |
| setCuePoints(cp:Array) : Void
Creates and populates an array of CuePoint objects. |
| setMedia(aUrl:String, aType:String) : Void
Sets both the content path and the media type together. |
| stop() : Void
Stops playback of the media and resets the playhead to zero. |
| Methods inherited from class mx.core.UIComponent |
getFocus
setFocus
getFocusManager
|
| Properties | |
static | version:String
MediaComponentVersion is for internal use only. |
| fps:Number
The frames per second, which is used only for video, and only in the configuration user interface. |
| videoWidth:Number
[Read-Only]
True width of the video display. |
| videoHeight:Number
[Read-Only]
True height of the video display. |
| autoSize:Boolean
[Read-Write]
Whether the display sizes itself according to the preferred size of the media. |
| aspectRatio:Boolean
[Read-Write]
If true, the MediaDisplay or MediaPlayback instance maintains the aspect ratio. |
| autoPlay:Boolean
[Read-Write]
If true, the media immediately begins to buffer and play. |
| playheadTime:Number
[Read-Write]
Playhead position, measured in seconds since starting playing. |
| contentPath:String
[Read-Write]
Relative path and filename of the media to stream. |
| volume:Number
[Read-Write]
The volume level, specified by an integer from 0 to 100. |
| playing:Boolean
[Read-Only]
If true, the media is currently playing. |
| bytesLoaded:Number
[Read-Only]
Number of bytes already loaded that are available for playing. |
| bytesTotal:Number
[Read-Only]
Total number of bytes to load into the control. |
| mediaType:String
[Read-Write]
Type of media to play, either Flash video (FLV), or MP3 file (MP3). |
| totalTime:Number
[Read-Write]
Total length of the media in seconds. |
| cuePoints:Array
[Read-Write]
Array of CuePoint objects that includes all the cue points assigned to a given control instance. |
| mostRecentCuePoint:CuePoint
[Read-Only]
Read-only property that contains the most recently fired cue point. |
| mostRecentCuePointTime:Number
[Read-Only]
Read-only property that contains the time, in seconds, within the playback media when the most recent cue point fired. |
| associatedController:Void
[Write-Only]
MediaController control associated with the MediaDisplay control. |
| Properties inherited from class mx.core.UIComponent |
version
enabled
tabIndex
|
| Effects |
| Effects inherited from class mx.core.UIComponent |
showEffect
hideEffect
focusInEffect
focusOutEffect
|
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
moveEffect
resizeEffect
mouseDownEffect
mouseOverEffect
mouseOutEffect
mouseUpEffect
|
| Events | |
change | Broadcasts continuously while media is playing. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
progress | Broadcasts continuously until the media has downloaded completely. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
cuePoint | Broadcasts when the value of a cuepoint`s time property is equal to that of the playhead location of the MediaPlayback or MediaDisplay control with which it is associated. The event object contains the properties: - cuePointName, which is a string that contains the name of the cuePoint. - cuePointTime, which is an integer that contains the frame number or playing duration in seconds. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
complete | Broadcasts when the playhead has reached the end of the media. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
start | Broadcast when enough media has been buffered to begin play. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
| Events inherited from class: mx.core.UIComponent |
focusIn
focusOut
keyDown
keyUp
show
hide
valid
invalid
valueCommitted
|
| Styles |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textDecoration
textIndent
marginLeft
marginRight
horizontalGap
verticalGap
|
| Constructor Detail |
MediaDisplay()
| Method Detail |
addCuePoint(aName:String, aTime:Number) : Void
Parameters
aName - Name of the cue point.
aTime - Time in the media where to add the cue point.
addCuePointObject(aCuePoint:CuePoint) : Void
Parameters
aCuePoint - The cue point to add.
associateController(c:MediaController) : Void
Parameters
c -
getCuePoint(pointName:String) : CuePoint
Parameters
pointName - Name of the cue point to find.
Returns
CuePoint associated with this object that has the given name.
getCuePoints() : Array
Returns
Array of CuePoint objects.
handleEvent(ev:Object) : Void
Parameters
ev - Event broadcast from the controller.
handlePlayer(player:IPlayer, status:String) :
Void
Parameters
player - Player.
status - Status.
measure() : Void
pause() : Void
play(startingPoint:Number) : Void
Parameters
startingPoint - The number of seconds into the media where the playback should start. This is an optional parameter. If omitted, playing starts at the current playhead position.
removeAllCuePoints() : Void
removeCuePoint(aCuePoint:CuePoint) : Void
Parameters
aCuePoint - Cue point to remove.
setCuePoints(cp:Array) : Void
Parameters
cp - Array of CuePoint objects.
setMedia(aUrl:String, aType:String) :
Void
Parameters
aUrl -
aType - Media type.
stop() : Void
| Property Detail |
aspectRatio:Boolean
[Read-Write]
associatedController:Void
[Write-Only]
autoPlay:Boolean
[Read-Write]
autoSize:Boolean
[Read-Write]
bytesLoaded:Number
[Read-Only]
bytesTotal:Number
[Read-Only]
contentPath:String
[Read-Write]
cuePoints:Array
[Read-Write]
fps:Number
mediaType:String
[Read-Write]
mostRecentCuePoint:CuePoint
[Read-Only]
mostRecentCuePointTime:Number
[Read-Only]
playheadTime:Number
[Read-Write]
playing:Boolean
[Read-Only]
totalTime:Number
[Read-Write]
static version:String
videoHeight:Number
[Read-Only]
videoWidth:Number
[Read-Only]
volume:Number
[Read-Write]