| 패키지 | org.osmf.traits |
| 클래스 | public class TraitEventDispatcher |
| 상속 | TraitEventDispatcher EventDispatcher Object |
| 하위 클래스 | MediaPlayer |
| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
| 속성 | 정의 주체 | ||
|---|---|---|---|
![]() | constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | |
| media : MediaElement
The MediaElement which will be monitored, and whose trait events
will be redispatched. | TraitEventDispatcher | ||
| 메서드 | 정의 주체 | ||
|---|---|---|---|
Constructor. | TraitEventDispatcher | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | |
![]() |
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | |
![]() |
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | |
![]() |
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | |
![]() |
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | |
![]() |
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | |
![]() |
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | |
![]() |
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | |
![]() |
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 프리미티브 값을 반환합니다. | Object | |
![]() |
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | |
| 이벤트 | 요약 | 정의 주체 | ||
|---|---|---|---|---|
![]() | [브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다. | 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 | |||
![]() | [브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다. | 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 | 속성 |
media:MediaElement| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
The MediaElement which will be monitored, and whose trait events will be redispatched.
구현
public function get media():MediaElement public function set media(value:MediaElement):voidTraitEventDispatcher | () | 생성자 |
public function TraitEventDispatcher()| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Constructor.
audioSwitchingChange | 이벤트 |
org.osmf.events.AlternativeAudioEvent속성 AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.6 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.DynamicStreamEvent속성 DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the autoSwitch property has changed.
bufferingChange | 이벤트 |
org.osmf.events.BufferEvent속성 BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the buffering property has changed.
bufferTimeChange | 이벤트 |
org.osmf.events.BufferEvent속성 BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the bufferTime property has changed.
bytesTotalChange | 이벤트 |
org.osmf.events.LoadEvent속성 LoadEvent.type =
org.osmf.events.LoadEvent| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the bytesTotal property has changed.
canPauseChange | 이벤트 |
org.osmf.events.PlayEvent속성 PlayEvent.type =
org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the canPause property has changed.
complete | 이벤트 |
org.osmf.events.TimeEvent속성 TimeEvent.type =
org.osmf.events.TimeEvent.COMPLETE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.DisplayObjectEvent속성 DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the displayObject property of the media has changed.
drmStateChange | 이벤트 |
org.osmf.events.DRMEvent속성 DRMEvent.type =
org.osmf.events.DRMEvent.DRM_STATE_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.TimeEvent속성 TimeEvent.type =
org.osmf.events.TimeEvent.DURATION_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the duration property of the media has changed.
isRecordingChange | 이벤트 |
org.osmf.events.DVREvent속성 DVREvent.type =
org.osmf.events.DVREvent.IS_RECORDING_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10.1, AIR 1.5 |
Dispatched when the isRecording property has changed.
loadStateChange | 이벤트 |
org.osmf.events.LoadEvent속성 LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.DisplayObjectEvent속성 DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the mediaWidth and/or mediaHeight property of the
media has changed.
mutedChange | 이벤트 |
org.osmf.events.AudioEvent속성 AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the muted property of the media has changed.
numAlternativeAudioStreamsChange | 이벤트 |
org.osmf.events.AlternativeAudioEvent속성 AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.6 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.DynamicStreamEvent속성 DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.AudioEvent속성 AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the pan property of the media has changed.
playStateChange | 이벤트 |
org.osmf.events.PlayEvent속성 PlayEvent.type =
org.osmf.events.PlayEvent.PLAY_STATE_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the playing or paused property of the media has changed.
seekingChange | 이벤트 |
org.osmf.events.SeekEvent속성 SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Dispatched when the seeking property of the media has changed.
switchingChange | 이벤트 |
org.osmf.events.DynamicStreamEvent속성 DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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 | 이벤트 |
org.osmf.events.AudioEvent속성 AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | OSMF 1.0 |
| 런타임 버전: | 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, 03:17 PM Z
상속되는 공용 속성 숨기기
상속되는 공용 속성 표시