Paket | org.osmf.traits |
Klass | public class PlayTrait |
Arv | PlayTrait MediaTraitBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.PLAY)
method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.PLAY)
returns true
,
use the MediaElement.getTrait(MediaTraitType.PLAY)
method
to get an object of this type.
Relaterade API-element
Egenskap | Definieras med | ||
---|---|---|---|
canPause : Boolean [skrivskyddad]
Indicates whether the media can be paused. | PlayTrait | ||
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
playState : String [skrivskyddad]
The current playback state, of type PlayState. | PlayTrait | ||
traitType : String [skrivskyddad]
The MediaTraitType for this trait. | MediaTraitBase |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | PlayTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Pauses the media if it is not already paused. | PlayTrait | ||
Plays the media if it is not already playing. | PlayTrait | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Stops the media if it is not already stopped. | PlayTrait | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
Called just after the playState property value
has changed. | PlayTrait | ||
Called immediately before the playState property value is changed. | PlayTrait | ||
Sets the canPause property for this PlayTrait. | PlayTrait |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
Dispatched when the canPause property has changed. | PlayTrait | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when playback resumes after a live stall | PlayTrait | |||
Dispatched when playback runs out of content for a live stream but the stream is not done. | PlayTrait | |||
Dispatched when the playState of the PlayTrait has changed. | PlayTrait |
canPause | egenskap |
playState | egenskap |
PlayTrait | () | Konstruktor |
public function PlayTrait()
Constructor.
pause | () | metod |
public final function pause():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Pauses the media if it is not already paused.
Utlöser
IllegalOperationError — If canPause returns false.
|
play | () | metod |
public final function play():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Plays the media if it is not already playing.
playStateChangeEnd | () | metod |
protected function playStateChangeEnd():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Called just after the playState
property value
has changed. Dispatches the change event.
Subclasses that override should call this method to dispatch the relevant PlayEvent.
playStateChangeStart | () | metod |
protected function playStateChangeStart(newPlayState:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Called immediately before the playState
property value is changed.
Subclasses can override this method to communicate the change to the media.
Parametrar
newPlayState:String |
setCanPause | () | metod |
stop | () | metod |
public final function stop():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Stops the media if it is not already stopped.
When media is stopped, then any subsequent call to
play
should start from the beginning (though
this is up to the actual implementation).
canPauseChange | Händelse |
org.osmf.events.PlayEvent
egenskap PlayEvent.type =
org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the canPause property has changed.
The PlayEvent.CAN_PAUSE_CHANGE constant defines the value of the type property of the event object for a canPauseChange event.liveResume | Händelse |
org.osmf.events.PlayEvent
egenskap PlayEvent.type =
org.osmf.events.PlayEvent.LIVE_RESUME
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when playback resumes after a live stall
The PlayEvent.LIVE_RESUME constant defines the value of the type property of the event object for a liveResume event.
Dispatched when playback resumes after a live stall
liveStall | Händelse |
org.osmf.events.PlayEvent
egenskap PlayEvent.type =
org.osmf.events.PlayEvent.LIVE_STALL
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when playback runs out of content for a live stream but the stream is not done.
The PlayEvent.LIVE_STALL constant defines the value of the type property of the event object for a liveStall event.
Dispatched when playback runs out of content for a live stream but the stream is not done.
playStateChange | Händelse |
org.osmf.events.PlayEvent
egenskap PlayEvent.type =
org.osmf.events.PlayEvent.PLAY_STATE_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the playState of the PlayTrait has changed.
The PlayEvent.PLAY_STATE_CHANGE constant defines the value of the type property of the event object for a playStateChange event.Tue Jun 12 2018, 01:40 PM Z