패키지 | org.osmf.traits |
클래스 | public class DynamicStreamTrait |
상속 | DynamicStreamTrait MediaTraitBase EventDispatcher Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.DYNAMIC_STREAM)
method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.DYNAMIC_STREAM)
returns true
,
use the MediaElement.getTrait(MediaTraitType.DYNAMIC_STREAM)
method
to get an object of this type.
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
autoSwitch : Boolean
Defines whether or not the trait should be in manual
or auto-switch mode. | DynamicStreamTrait | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
currentIndex : int [읽기 전용]
The index of the current dynamic stream. | DynamicStreamTrait | ||
maxAllowedIndex : int
The maximum allowed index. | DynamicStreamTrait | ||
numDynamicStreams : int [읽기 전용]
The total number of dynamic streams. | DynamicStreamTrait | ||
switching : Boolean [읽기 전용]
Indicates whether or not a switch is currently in progress. | DynamicStreamTrait | ||
traitType : String [읽기 전용]
The MediaTraitType for this trait. | MediaTraitBase |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | DynamicStreamTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Returns the associated bitrate, in kilobits per second, for the specified index. | DynamicStreamTrait | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
Switch to a specific index. | DynamicStreamTrait | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
메서드 | 정의 주체 | ||
---|---|---|---|
Called just after the autoSwitch property has changed. | DynamicStreamTrait | ||
Called immediately before the autoSwitch property is changed. | DynamicStreamTrait | ||
Called just after the maxAllowedIndex property has changed. | DynamicStreamTrait | ||
Called immediately before the maxAllowedIndex property is changed. | DynamicStreamTrait | ||
Invoking this setter will result in the trait's currentIndex
property changing. | DynamicStreamTrait | ||
Invoking this setter will result in the trait's numDynamicStreams
property changing. | DynamicStreamTrait | ||
Must be called by the implementing media on completing a switch. | DynamicStreamTrait | ||
Called just after the switching property has changed. | DynamicStreamTrait | ||
Called immediately before the switching property is changed. | DynamicStreamTrait |
이벤트 | 요약 | 정의 주체 | ||
---|---|---|---|---|
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다. | EventDispatcher | |||
Dispatched when the autoSwitch property changed. | DynamicStreamTrait | |||
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다. | EventDispatcher | |||
Dispatched when the number of dynamic streams has changed. | DynamicStreamTrait | |||
Dispatched when a stream switch is requested, completed, or failed. | DynamicStreamTrait |
autoSwitch | 속성 |
autoSwitch:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Defines whether or not the trait should be in manual
or auto-switch mode. If in manual mode the switchTo
method can be used to manually switch to a specific stream.
구현
public function get autoSwitch():Boolean
public function set autoSwitch(value:Boolean):void
currentIndex | 속성 |
maxAllowedIndex | 속성 |
maxAllowedIndex:int
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
The maximum allowed index. This can be set at run-time to provide a ceiling for the switching profile, for example, to keep from switching up to a higher quality stream when the current video is too small to handle a higher quality stream. The default is the highest stream index.
구현
public function get maxAllowedIndex():int
public function set maxAllowedIndex(value:int):void
오류
RangeError — If the specified index is less than zero or
greater than the total number of dynamic streams.
|
numDynamicStreams | 속성 |
switching | 속성 |
switching:Boolean
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Indicates whether or not a switch is currently in progress.
This property will return true
while a switch has been
requested and the switch has not yet been acknowledged and no switch failure
has occurred. Once the switch request has been acknowledged or a
failure occurs, the property will return false
.
구현
public function get switching():Boolean
DynamicStreamTrait | () | 생성자 |
public function DynamicStreamTrait(autoSwitch:Boolean = true, currentIndex:int = 0, numDynamicStreams:int = 1)
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Constructor.
매개 변수autoSwitch:Boolean (default = true ) — The initial autoSwitch state for the trait. The default is true.
| |
currentIndex:int (default = 0 ) — The initial stream index for the trait. The default is zero.
| |
numDynamicStreams:int (default = 1 ) — The total number of dynamic streams.
|
autoSwitchChangeEnd | () | 메서드 |
protected function autoSwitchChangeEnd():void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called just after the autoSwitch
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
autoSwitchChangeStart | () | 메서드 |
protected function autoSwitchChangeStart(value:Boolean):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called immediately before the autoSwitch
property is changed.
Subclasses can override this method to communicate the change to the media.
매개 변수
value:Boolean — New value for the autoSwitch property.
|
getBitrateForIndex | () | 메서드 |
public function getBitrateForIndex(index:int):Number
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Returns the associated bitrate, in kilobits per second, for the specified index.
매개 변수
index:int |
Number |
오류
RangeError — If the specified index is less than zero or
greater than the highest index available.
|
maxAllowedIndexChangeEnd | () | 메서드 |
protected function maxAllowedIndexChangeEnd():void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called just after the maxAllowedIndex
property has changed.
maxAllowedIndexChangeStart | () | 메서드 |
protected function maxAllowedIndexChangeStart(newIndex:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called immediately before the maxAllowedIndex
property is changed.
Subclasses can override this method to communicate the change to the media.
매개 변수
newIndex:int — New value for the maxAllowedIndex property.
|
setCurrentIndex | () | 메서드 |
setNumDynamicStreams | () | 메서드 |
setSwitching | () | 메서드 |
protected final function setSwitching(newSwitching:Boolean, index:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a switch.
Calls the switchingChangeStart()
and switchingChangeEnd()
methods.
매개 변수
newSwitching:Boolean — New switching value for the trait.
| |
index:int — The index to which the switch shall (or did) occur.
|
switchingChangeEnd | () | 메서드 |
protected function switchingChangeEnd(index:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called just after the switching
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
매개 변수
index:int — The index of the switched-to stream.
|
switchingChangeStart | () | 메서드 |
protected function switchingChangeStart(newSwitching:Boolean, index:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Called immediately before the switching
property is changed.
Subclasses can override this method to communicate the change to the media.
매개 변수
newSwitching:Boolean — New value for the switching property.
| |
index:int — The index of the stream to switch to.
|
switchTo | () | 메서드 |
public function switchTo(index:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Switch to a specific index. To switch up, use the currentIndex
property, such as:
obj.switchTo(obj.currentIndex + 1);
매개 변수
index:int |
오류
RangeError — If the specified index is less than zero or
greater than maxAllowedIndex .
Note: If the media is paused, switching will not take place until after play resumes.
| |
IllegalOperationError — If the stream is not in manual switch mode.
|
관련 API 요소
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 changed.
The DynamicStreamEvent.AUTO_SWITCH_CHANGE constant defines the value of the type property of the event object for an autoSwitchChange event.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.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 stream switch is requested, completed, or failed.
The DynamicStreamEvent.SWITCHING_CHANGE constant defines the value of the type property of the event object for a switchingChange event.Tue Jun 12 2018, 03:17 PM Z