| Pakiet | org.osmf.traits |
| Klasa | public class TraitEventDispatcher |
| Dziedziczenie | TraitEventDispatcher EventDispatcher Object |
| Podklasy | MediaPlayer |
| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
| Właściwość | Zdefiniowane przez | ||
|---|---|---|---|
![]() | constructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu. | Object | |
| media : MediaElement
The MediaElement which will be monitored, and whose trait events
will be redispatched. | TraitEventDispatcher | ||
| Metoda | Zdefiniowane przez | ||
|---|---|---|---|
Constructor. | TraitEventDispatcher | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Rejestruje obiekt detektora zdarzeń w obiekcie EventDispatcher, dzięki czemu detektor będzie otrzymywał powiadomienia o zdarzeniu. | EventDispatcher | |
![]() |
Wywołuje zdarzenie, tj. kieruje je do przepływu zdarzeń. | EventDispatcher | |
![]() |
Sprawdza, czy obiekt EventDispatcher zawiera jakiekolwiek detektory zarejestrowane dla konkretnego typu zdarzeń. | EventDispatcher | |
![]() |
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość. | Object | |
![]() |
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr. | Object | |
![]() |
Wskazuje, czy określona właściwość istnieje i jest przeliczalna. | Object | |
![]() |
Usuwa detektor z obiektu EventDispatcher. | EventDispatcher | |
![]() |
Ustawia dostępność właściwości dynamicznej używanej w pętlach. | Object | |
![]() |
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych. | Object | |
![]() |
Zwraca ciąg reprezentujący określony obiekt. | Object | |
![]() |
Zwraca pierwotną wartość dla określonego obiektu. | Object | |
![]() |
Sprawdza, czy detektor zdarzeń określonego typu jest zarejestrowany w tym obiekcie EventDispatcher lub jego elementach macierzystych. | EventDispatcher | |
| Zdarzenie | Podsumowanie | Zdefiniowane przez | ||
|---|---|---|---|---|
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja środowiska wykonawczego AIR uzyskuje fokus w systemie operacyjnym i przechodzi w stan aktywny. | 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 | |||
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja AIR traci fokus w systemie operacyjnym i przechodzi w stan nieaktywny. | 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 | właściwość |
media:MediaElement| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The MediaElement which will be monitored, and whose trait events will be redispatched.
Implementacja
public function get media():MediaElement public function set media(value:MediaElement):voidTraitEventDispatcher | () | Konstruktor |
public function TraitEventDispatcher()| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Constructor.
audioSwitchingChange | Zdarzenie |
org.osmf.events.AlternativeAudioEventwłaściwość AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.6 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.DynamicStreamEventwłaściwość DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the autoSwitch property has changed.
bufferingChange | Zdarzenie |
org.osmf.events.BufferEventwłaściwość BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the buffering property has changed.
bufferTimeChange | Zdarzenie |
org.osmf.events.BufferEventwłaściwość BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the bufferTime property has changed.
bytesTotalChange | Zdarzenie |
org.osmf.events.LoadEventwłaściwość LoadEvent.type =
org.osmf.events.LoadEvent| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the bytesTotal property has changed.
canPauseChange | Zdarzenie |
org.osmf.events.PlayEventwłaściwość PlayEvent.type =
org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the canPause property has changed.
complete | Zdarzenie |
org.osmf.events.TimeEventwłaściwość TimeEvent.type =
org.osmf.events.TimeEvent.COMPLETE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.DisplayObjectEventwłaściwość DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the displayObject property of the media has changed.
drmStateChange | Zdarzenie |
org.osmf.events.DRMEventwłaściwość DRMEvent.type =
org.osmf.events.DRMEvent.DRM_STATE_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.TimeEventwłaściwość TimeEvent.type =
org.osmf.events.TimeEvent.DURATION_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the duration property of the media has changed.
isRecordingChange | Zdarzenie |
org.osmf.events.DVREventwłaściwość DVREvent.type =
org.osmf.events.DVREvent.IS_RECORDING_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10.1, AIR 1.5 |
Dispatched when the isRecording property has changed.
loadStateChange | Zdarzenie |
org.osmf.events.LoadEventwłaściwość LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.DisplayObjectEventwłaściwość DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the mediaWidth and/or mediaHeight property of the
media has changed.
mutedChange | Zdarzenie |
org.osmf.events.AudioEventwłaściwość AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the muted property of the media has changed.
numAlternativeAudioStreamsChange | Zdarzenie |
org.osmf.events.AlternativeAudioEventwłaściwość AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.6 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.DynamicStreamEventwłaściwość DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.AudioEventwłaściwość AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the pan property of the media has changed.
playStateChange | Zdarzenie |
org.osmf.events.PlayEventwłaściwość PlayEvent.type =
org.osmf.events.PlayEvent.PLAY_STATE_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the playing or paused property of the media has changed.
seekingChange | Zdarzenie |
org.osmf.events.SeekEventwłaściwość SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the seeking property of the media has changed.
switchingChange | Zdarzenie |
org.osmf.events.DynamicStreamEventwłaściwość DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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 | Zdarzenie |
org.osmf.events.AudioEventwłaściwość AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | 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, 12:06 PM Z
Ukryj dziedziczone właściwości publiczne
Pokaż dziedziczone właściwości publiczne