| Pacote | org.osmf.traits |
| Classe | public class DynamicStreamTrait |
| Herança | DynamicStreamTrait MediaTraitBase EventDispatcher Object |
| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Elementos da API relacionados
| Propriedade | Definido por | ||
|---|---|---|---|
| autoSwitch : Boolean
Defines whether or not the trait should be in manual
or auto-switch mode. | DynamicStreamTrait | ||
![]() | constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | |
| currentIndex : int [somente leitura]
The index of the current dynamic stream. | DynamicStreamTrait | ||
| maxAllowedIndex : int
The maximum allowed index. | DynamicStreamTrait | ||
| numDynamicStreams : int [somente leitura]
The total number of dynamic streams. | DynamicStreamTrait | ||
| switching : Boolean [somente leitura]
Indicates whether or not a switch is currently in progress. | DynamicStreamTrait | ||
![]() | traitType : String [somente leitura]
The MediaTraitType for this trait. | MediaTraitBase | |
| Método | Definido por | ||
|---|---|---|---|
Constructor. | DynamicStreamTrait | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra um objeto de ouvinte de evento em um objeto EventDispatcher, de forma que o ouvinte receba a notificação de um evento. | EventDispatcher | |
![]() |
Envia um evento para o fluxo de eventos. | EventDispatcher | |
![]() |
Disposes of any resources used by this trait. | MediaTraitBase | |
Returns the associated bitrate, in kilobits per second, for the specified index. | DynamicStreamTrait | ||
![]() |
Verifica se o objeto EventDispatcher tem ouvintes registrados para um tipo específico de evento. | EventDispatcher | |
![]() |
Indica se um objeto tem uma propriedade especificada definida. | Object | |
![]() |
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | |
![]() |
Indica se a propriedade especificada existe e é enumerável. | Object | |
![]() |
Remove um ouvinte do objeto EventDispatcher. | EventDispatcher | |
![]() |
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | |
Switch to a specific index. | DynamicStreamTrait | ||
![]() |
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | |
![]() |
Retorna a representação de string do objeto especificado. | Object | |
![]() |
Retorna o valor primitivo do objeto especificado. | Object | |
![]() |
Verifica se um ouvinte de evento está registrado nesse objeto EventDispatcher ou em qualquer um de seus ancestrais para o tipo de evento especificado. | EventDispatcher | |
| Método | Definido por | ||
|---|---|---|---|
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 | ||
| Evento | Resumo | Definido por | ||
|---|---|---|---|---|
![]() | [transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR ganha o foco do sistema operacional e está se tornando inativo. | EventDispatcher | ||
| Dispatched when the autoSwitch property changed. | DynamicStreamTrait | |||
![]() | [transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR perde o foco do sistema operacional e está se tornando inativo. | EventDispatcher | ||
| Dispatched when the number of dynamic streams has changed. | DynamicStreamTrait | |||
| Dispatched when a stream switch is requested, completed, or failed. | DynamicStreamTrait | |||
autoSwitch | propriedade |
autoSwitch:Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Implementação
public function get autoSwitch():Boolean public function set autoSwitch(value:Boolean):voidcurrentIndex | propriedade |
maxAllowedIndex | propriedade |
maxAllowedIndex:int| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Implementação
public function get maxAllowedIndex():int public function set maxAllowedIndex(value:int):voidLança
RangeError — If the specified index is less than zero or
greater than the total number of dynamic streams.
|
numDynamicStreams | propriedade |
switching | propriedade |
switching:Boolean [somente leitura] | Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Implementação
public function get switching():BooleanDynamicStreamTrait | () | Construtor |
public function DynamicStreamTrait(autoSwitch:Boolean = true, currentIndex:int = 0, numDynamicStreams:int = 1)| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | Flash Player 10, AIR 1.5 |
Constructor.
ParâmetrosautoSwitch: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 | () | método |
protected function autoSwitchChangeEnd():void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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 | () | método |
protected function autoSwitchChangeStart(value:Boolean):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Parâmetros
value:Boolean — New value for the autoSwitch property.
|
getBitrateForIndex | () | método |
public function getBitrateForIndex(index:int):Number| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | Flash Player 10, AIR 1.5 |
Returns the associated bitrate, in kilobits per second, for the specified index.
Parâmetros
index:int |
Number |
Lança
RangeError — If the specified index is less than zero or
greater than the highest index available.
|
maxAllowedIndexChangeEnd | () | método |
protected function maxAllowedIndexChangeEnd():void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | Flash Player 10, AIR 1.5 |
Called just after the maxAllowedIndex property has changed.
maxAllowedIndexChangeStart | () | método |
protected function maxAllowedIndexChangeStart(newIndex:int):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Parâmetros
newIndex:int — New value for the maxAllowedIndex property.
|
setCurrentIndex | () | método |
setNumDynamicStreams | () | método |
setSwitching | () | método |
protected final function setSwitching(newSwitching:Boolean, index:int):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a switch.
Calls the switchingChangeStart() and switchingChangeEnd()
methods.
Parâmetros
newSwitching:Boolean — New switching value for the trait.
| |
index:int — The index to which the switch shall (or did) occur.
|
switchingChangeEnd | () | método |
protected function switchingChangeEnd(index:int):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Parâmetros
index:int — The index of the switched-to stream.
|
switchingChangeStart | () | método |
protected function switchingChangeStart(newSwitching:Boolean, index:int):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.
Parâmetros
newSwitching:Boolean — New value for the switching property.
| |
index:int — The index of the stream to switch to.
|
switchTo | () | método |
public function switchTo(index:int):void| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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);
Parâmetros
index:int |
Lança
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.
|
Elementos da API relacionados
autoSwitchChange | Evento |
org.osmf.events.DynamicStreamEventpropriedade DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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 | Evento |
org.osmf.events.DynamicStreamEventpropriedade DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de 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.switchingChange | Evento |
org.osmf.events.DynamicStreamEventpropriedade DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | OSMF 1.0 |
| Versões de runtime: | 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.Wed Jun 13 2018, 11:10 AM Z
Ocultar propriedades públicas herdadas
Mostrar propriedades públicas herdadas