Pacchetto | org.osmf.traits |
Classe | public class TraitEventDispatcher |
Ereditarietà | TraitEventDispatcher EventDispatcher Object |
Sottoclassi | MediaPlayer |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Proprietà | Definito da | ||
---|---|---|---|
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
media : MediaElement
The MediaElement which will be monitored, and whose trait events
will be redispatched. | TraitEventDispatcher |
Metodo | Definito da | ||
---|---|---|---|
Constructor. | TraitEventDispatcher | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | ||
Invia un evento nel flusso di eventi. | EventDispatcher | ||
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | ||
Indica se per un oggetto è definita una proprietà specifica. | Object | ||
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | ||
Indica se la proprietà specificata esiste ed è enumerabile. | Object | ||
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | ||
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | ||
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | ||
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | ||
Restituisce il valore di base dell'oggetto specificato. | Object | ||
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher |
Evento | Riepilogo | Definito da | ||
---|---|---|---|---|
[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo. | 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 | |||
[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo. | 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 | proprietà |
media:MediaElement
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
The MediaElement which will be monitored, and whose trait events will be redispatched.
Implementazione
public function get media():MediaElement
public function set media(value:MediaElement):void
TraitEventDispatcher | () | Funzione di costruzione |
public function TraitEventDispatcher()
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Constructor.
audioSwitchingChange | Evento |
org.osmf.events.AlternativeAudioEvent
proprietà AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.6 |
Versioni runtime: | 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 | Evento |
org.osmf.events.DynamicStreamEvent
proprietà DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the autoSwitch
property has changed.
bufferingChange | Evento |
org.osmf.events.BufferEvent
proprietà BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the buffering
property has changed.
bufferTimeChange | Evento |
org.osmf.events.BufferEvent
proprietà BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the bufferTime
property has changed.
bytesTotalChange | Evento |
org.osmf.events.LoadEvent
proprietà LoadEvent.type =
org.osmf.events.LoadEvent
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the bytesTotal
property has changed.
canPauseChange | Evento |
org.osmf.events.PlayEvent
proprietà PlayEvent.type =
org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the canPause
property has changed.
complete | Evento |
org.osmf.events.TimeEvent
proprietà TimeEvent.type =
org.osmf.events.TimeEvent.COMPLETE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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 | Evento |
org.osmf.events.DisplayObjectEvent
proprietà DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the displayObject
property of the media has changed.
drmStateChange | Evento |
org.osmf.events.DRMEvent
proprietà DRMEvent.type =
org.osmf.events.DRMEvent.DRM_STATE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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 | Evento |
org.osmf.events.TimeEvent
proprietà TimeEvent.type =
org.osmf.events.TimeEvent.DURATION_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the duration
property of the media has changed.
isRecordingChange | Evento |
org.osmf.events.DVREvent
proprietà DVREvent.type =
org.osmf.events.DVREvent.IS_RECORDING_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10.1, AIR 1.5 |
Dispatched when the isRecording
property has changed.
loadStateChange | Evento |
org.osmf.events.LoadEvent
proprietà LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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 | Evento |
org.osmf.events.DisplayObjectEvent
proprietà DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the mediaWidth
and/or mediaHeight
property of the
media has changed.
mutedChange | Evento |
org.osmf.events.AudioEvent
proprietà AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the muted
property of the media has changed.
numAlternativeAudioStreamsChange | Evento |
org.osmf.events.AlternativeAudioEvent
proprietà AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.6 |
Versioni runtime: | 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 | Evento |
org.osmf.events.DynamicStreamEvent
proprietà DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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 | Evento |
org.osmf.events.AudioEvent
proprietà AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the pan
property of the media has changed.
playStateChange | Evento |
org.osmf.events.PlayEvent
proprietà PlayEvent.type =
org.osmf.events.PlayEvent.PLAY_STATE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the playing
or paused
property of the media has changed.
seekingChange | Evento |
org.osmf.events.SeekEvent
proprietà SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the seeking
property of the media has changed.
switchingChange | Evento |
org.osmf.events.DynamicStreamEvent
proprietà DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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 | Evento |
org.osmf.events.AudioEvent
proprietà AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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"); } } }
Tue Jun 12 2018, 02:44 PM Z