Package | feathers.media |
Interface | public interface ITimedMediaPlayer extends IMediaPlayer, IFeathersEventDispatcher |
Implementors | BaseTimedMediaPlayer |
Product Version : | Feathers 2.2.0 |
Property | Defined By | ||
---|---|---|---|
currentTime : Number [read-only]
The current position of the playhead, in seconds. | ITimedMediaPlayer | ||
isPlaying : Boolean [read-only]
Determines if the media content is currently playing. | ITimedMediaPlayer | ||
totalTime : Number [read-only]
The maximum position of the playhead, in seconds. | ITimedMediaPlayer |
Method | Defined By | ||
---|---|---|---|
addEventListener(type:String, listener:Function):void
Adds a listener for an event type. | IFeathersEventDispatcher | ||
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type. | IFeathersEventDispatcher | ||
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners
for the specified event type. | IFeathersEventDispatcher | ||
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type. | IFeathersEventDispatcher | ||
pause():void
Pauses the media content. | ITimedMediaPlayer | ||
play():void
Plays the media content. | ITimedMediaPlayer | ||
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type. | IFeathersEventDispatcher | ||
removeEventListeners(type:String = null):void
Removes all listeners for an event type. | IFeathersEventDispatcher | ||
seek(seconds:Number):void
Seeks the media content to a specific position, in seconds. | ITimedMediaPlayer | ||
stop():void
Stops the media content and returns the playhead to the beginning. | ITimedMediaPlayer | ||
togglePlayPause():void
Toggles the media content between playing and paused states. | ITimedMediaPlayer |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the media has played to its end. | ITimedMediaPlayer | |||
Dispatched when the media player's current playhead time changes. | ITimedMediaPlayer | |||
Dispatched when the media player's playback state changes, such as when it begins playing or is paused. | ITimedMediaPlayer | |||
Dispatched when the media player's total playhead time changes. | ITimedMediaPlayer |
currentTime | property |
currentTime:Number
[read-only] The current position of the playhead, in seconds.
public function get currentTime():Number
See also
isPlaying | property |
isPlaying:Boolean
[read-only] Determines if the media content is currently playing.
public function get isPlaying():Boolean
See also
totalTime | property |
totalTime:Number
[read-only] The maximum position of the playhead, in seconds.
public function get totalTime():Number
See also
pause | () | method |
play | () | method |
seek | () | method |
public function seek(seconds:Number):void
Seeks the media content to a specific position, in seconds.
Parameters
seconds:Number |
stop | () | method |
public function stop():void
Stops the media content and returns the playhead to the beginning.
See also
togglePlayPause | () | method |
public function togglePlayPause():void
Toggles the media content between playing and paused states.
See also
complete | Event |
starling.events.Event
starling.events.Event.COMPLETE
Dispatched when the media has played to its end.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
currentTimeChange | Event |
starling.events.Event
feathers.events.MediaPlayerEventType.CURRENT_TIME_CHANGE
Dispatched when the media player's current playhead time changes.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
See also
playbackStageChange | Event |
starling.events.Event
feathers.events.MediaPlayerEventType.PLAYBACK_STATE_CHANGE
Dispatched when the media player's playback state changes, such as when it begins playing or is paused.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
See also
totalTimeChange | Event |
starling.events.Event
feathers.events.MediaPlayerEventType.TOTAL_TIME_CHANGE
Dispatched when the media player's total playhead time changes.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
See also