Pakket | org.osmf.traits |
Klasse | public class TraitEventDispatcher |
Overerving | TraitEventDispatcher EventDispatcher Object |
Subklassen | MediaPlayer |
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Eigenschap | Gedefinieerd door | ||
---|---|---|---|
constructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie. | Object | ||
media : MediaElement
The MediaElement which will be monitored, and whose trait events
will be redispatched. | TraitEventDispatcher |
Methode | Gedefinieerd door | ||
---|---|---|---|
Constructor. | TraitEventDispatcher | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registreert een gebeurtenislistenerobject bij een object EventDispatcher, zodat de listener een melding van een gebeurtenis ontvangt. | EventDispatcher | ||
Verzendt een gebeurtenis naar de gebeurtenisstroom. | EventDispatcher | ||
Controleert of het object EventDispatcher listeners heeft geregistreerd voor een specifiek type gebeurtenis. | EventDispatcher | ||
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | ||
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | ||
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | ||
Verwijdert een listener uit het object EventDispatcher. | EventDispatcher | ||
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | ||
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | ||
Retourneert een tekenreeksrepresentatie van het opgegeven object. | Object | ||
Retourneert de primitieve waarde van het opgegeven object. | Object | ||
Controleert of een gebeurtenislistener is geregistreerd bij dit object EventDispatcher of een van de voorouders voor het opgegeven type gebeurtenis. | EventDispatcher |
Gebeurtenis | Overzicht | Gedefinieerd door | ||
---|---|---|---|---|
[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de besturingssysteemfocus krijgt en actief wordt. | EventDispatcher | |||
Dispatched when an alternative audio stream switch is requested, completed, or has failed. | TraitEventDispatcher | |||
Dispatched when the autoSwitch property has changed. | TraitEventDispatcher | |||
Dispatched when the buffering property has changed. | TraitEventDispatcher | |||
Dispatched when the bufferTime property has changed. | TraitEventDispatcher | |||
Dispatched when the bytesTotal property has changed. | TraitEventDispatcher | |||
Dispatched when the canPause property has changed. | TraitEventDispatcher | |||
Dispatched when the media has completed playback. | TraitEventDispatcher | |||
[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de systeemfocus verliest en inactief wordt. | EventDispatcher | |||
Dispatched when the displayObject property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the state of the DRMTrait has changed. | TraitEventDispatcher | |||
Dispatched when the duration property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the isRecording property has changed. | TraitEventDispatcher | |||
Dispatched when the state of the LoadTrait has changed. | TraitEventDispatcher | |||
Dispatched when the mediaWidth and/or mediaHeight property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the muted property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the number of alternative audio streams has changed. | TraitEventDispatcher | |||
Dispatched when the number of dynamic streams has changed. | TraitEventDispatcher | |||
Dispatched when the pan property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the playing or paused property of the media has changed. | TraitEventDispatcher | |||
Dispatched when the seeking property of the media has changed. | TraitEventDispatcher | |||
Dispatched when a dynamic stream switch change occurs. | TraitEventDispatcher | |||
Dispatched when the volume property of the media has changed. | TraitEventDispatcher |
media | eigenschap |
media:MediaElement
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
The MediaElement which will be monitored, and whose trait events will be redispatched.
Implementatie
public function get media():MediaElement
public function set media(value:MediaElement):void
TraitEventDispatcher | () | Constructor |
public function TraitEventDispatcher()
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Constructor.
audioSwitchingChange | Gebeurtenis |
org.osmf.events.AlternativeAudioEvent
eigenschap AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.6 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when an alternative audio stream switch is requested, completed, or has failed.
Dispatched when the switching state of the alternative audio stream has changed. Usually for any successful switching operation, two AUDIO_SWITCHING_CHANGE events will be triggered. One when the switch operation starts ( theswitching
property will be set to true
) and one when the operation ends ( the
switching
property will be set to false
).
autoSwitchChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the autoSwitch
property has changed.
bufferingChange | Gebeurtenis |
org.osmf.events.BufferEvent
eigenschap BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the buffering
property has changed.
bufferTimeChange | Gebeurtenis |
org.osmf.events.BufferEvent
eigenschap BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the bufferTime
property has changed.
bytesTotalChange | Gebeurtenis |
org.osmf.events.LoadEvent
eigenschap LoadEvent.type =
org.osmf.events.LoadEvent
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the bytesTotal
property has changed.
canPauseChange | Gebeurtenis |
org.osmf.events.PlayEvent
eigenschap PlayEvent.type =
org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the canPause
property has changed.
complete | Gebeurtenis |
org.osmf.events.TimeEvent
eigenschap TimeEvent.type =
org.osmf.events.TimeEvent.COMPLETE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the media has completed playback.
The TimeEvent.COMPLETE constant defines the value of the type property of the event object for a complete event.displayObjectChange | Gebeurtenis |
org.osmf.events.DisplayObjectEvent
eigenschap DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the displayObject
property of the media has changed.
drmStateChange | Gebeurtenis |
org.osmf.events.DRMEvent
eigenschap DRMEvent.type =
org.osmf.events.DRMEvent.DRM_STATE_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10.1, AIR 1.5 |
Dispatched when the state of the DRMTrait has changed.
The DRMEvent.DRM_STATE_CHANGE constant defines the value of the type property of the event object for a change to the drmState of a DRMTrait.durationChange | Gebeurtenis |
org.osmf.events.TimeEvent
eigenschap TimeEvent.type =
org.osmf.events.TimeEvent.DURATION_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the duration
property of the media has changed.
isRecordingChange | Gebeurtenis |
org.osmf.events.DVREvent
eigenschap DVREvent.type =
org.osmf.events.DVREvent.IS_RECORDING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10.1, AIR 1.5 |
Dispatched when the isRecording
property has changed.
loadStateChange | Gebeurtenis |
org.osmf.events.LoadEvent
eigenschap LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the state of the LoadTrait has changed.
The LoadEvent.LOAD_STATE_CHANGE constant defines the value of the type property of the event object for a loadStateChange event.mediaSizeChange | Gebeurtenis |
org.osmf.events.DisplayObjectEvent
eigenschap DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the mediaWidth
and/or mediaHeight
property of the
media has changed.
mutedChange | Gebeurtenis |
org.osmf.events.AudioEvent
eigenschap AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the muted
property of the media has changed.
numAlternativeAudioStreamsChange | Gebeurtenis |
org.osmf.events.AlternativeAudioEvent
eigenschap AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.6 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the number of alternative audio streams has changed.
Dispatched when the number of available alternative audio streams has changed..numDynamicStreamsChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the number of dynamic streams has changed.
The DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE constant defines the value of the type property of the event object for a numDynamicStreamsChange event.panChange | Gebeurtenis |
org.osmf.events.AudioEvent
eigenschap AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the pan
property of the media has changed.
playStateChange | Gebeurtenis |
org.osmf.events.PlayEvent
eigenschap PlayEvent.type =
org.osmf.events.PlayEvent.PLAY_STATE_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the playing
or paused
property of the media has changed.
seekingChange | Gebeurtenis |
org.osmf.events.SeekEvent
eigenschap SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the seeking
property of the media has changed.
switchingChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when a dynamic stream switch change occurs.
The DynamicStreamEvent.SWITCHING_CHANGE constant defines the value of the type property of the event object for a switchingChange event.volumeChange | Gebeurtenis |
org.osmf.events.AudioEvent
eigenschap AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the volume
property of the media has changed.
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import org.osmf.elements.VideoElement; import org.osmf.events.AudioEvent; import org.osmf.events.PlayEvent; import org.osmf.media.MediaPlayerSprite; import org.osmf.media.URLResource; import org.osmf.traits.TraitEventDispatcher; public class TraitEventDispatcherExample extends Sprite { public function TraitEventDispatcherExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var urlResource:URLResource = new URLResource("rtmp://cp67126.edgefcs.net/ondemand/mediapm/strobe/content/test/SpaceAloneHD_sounas_640_500_short"); var videoElement:VideoElement = new VideoElement(); videoElement.resource = urlResource; var dispatcher:TraitEventDispatcher = new TraitEventDispatcher(); dispatcher.media = videoElement; dispatcher.addEventListener(AudioEvent.VOLUME_CHANGE, onVolumeChange); dispatcher.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange); addChild(mediaPlayerSprite); mediaPlayerSprite.media = videoElement; } private function onVolumeChange(event:AudioEvent):void { trace("onVolumeChange"); } private function onPlayStateChange(event:PlayEvent):void { trace("onPlayStateChange"); } } }
Wed Jun 13 2018, 11:42 AM Z