Pacchetto | org.osmf.traits |
Classe | public class DynamicStreamTrait |
Ereditarietà | DynamicStreamTrait MediaTraitBase EventDispatcher Object |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Elementi API correlati
Proprietà | Definito da | ||
---|---|---|---|
autoSwitch : Boolean
Defines whether or not the trait should be in manual
or auto-switch mode. | DynamicStreamTrait | ||
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
currentIndex : int [sola lettura]
The index of the current dynamic stream. | DynamicStreamTrait | ||
maxAllowedIndex : int
The maximum allowed index. | DynamicStreamTrait | ||
numDynamicStreams : int [sola lettura]
The total number of dynamic streams. | DynamicStreamTrait | ||
switching : Boolean [sola lettura]
Indicates whether or not a switch is currently in progress. | DynamicStreamTrait | ||
traitType : String [sola lettura]
The MediaTraitType for this trait. | MediaTraitBase |
Metodo | Definito da | ||
---|---|---|---|
Constructor. | DynamicStreamTrait | ||
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 | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Returns the associated bitrate, in kilobits per second, for the specified index. | DynamicStreamTrait | ||
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 | ||
Switch to a specific index. | DynamicStreamTrait | ||
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 |
Metodo | Definito da | ||
---|---|---|---|
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 | 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 the autoSwitch property changed. | DynamicStreamTrait | |||
[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 number of dynamic streams has changed. | DynamicStreamTrait | |||
Dispatched when a stream switch is requested, completed, or failed. | DynamicStreamTrait |
autoSwitch | proprietà |
autoSwitch:Boolean
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Implementazione
public function get autoSwitch():Boolean
public function set autoSwitch(value:Boolean):void
currentIndex | proprietà |
maxAllowedIndex | proprietà |
maxAllowedIndex:int
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Implementazione
public function get maxAllowedIndex():int
public function set maxAllowedIndex(value:int):void
Genera
RangeError — If the specified index is less than zero or
greater than the total number of dynamic streams.
|
numDynamicStreams | proprietà |
switching | proprietà |
switching:Boolean
[sola lettura] Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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
.
Implementazione
public function get switching():Boolean
DynamicStreamTrait | () | Funzione di costruzione |
public function DynamicStreamTrait(autoSwitch:Boolean = true, currentIndex:int = 0, numDynamicStreams:int = 1)
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Constructor.
ParametriautoSwitch: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 | () | metodo |
protected function autoSwitchChangeEnd():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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 | () | metodo |
protected function autoSwitchChangeStart(value:Boolean):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Parametri
value:Boolean — New value for the autoSwitch property.
|
getBitrateForIndex | () | metodo |
public function getBitrateForIndex(index:int):Number
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Returns the associated bitrate, in kilobits per second, for the specified index.
Parametri
index:int |
Number |
Genera
RangeError — If the specified index is less than zero or
greater than the highest index available.
|
maxAllowedIndexChangeEnd | () | metodo |
protected function maxAllowedIndexChangeEnd():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called just after the maxAllowedIndex
property has changed.
maxAllowedIndexChangeStart | () | metodo |
protected function maxAllowedIndexChangeStart(newIndex:int):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Parametri
newIndex:int — New value for the maxAllowedIndex property.
|
setCurrentIndex | () | metodo |
setNumDynamicStreams | () | metodo |
setSwitching | () | metodo |
protected final function setSwitching(newSwitching:Boolean, index:int):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a switch.
Calls the switchingChangeStart()
and switchingChangeEnd()
methods.
Parametri
newSwitching:Boolean — New switching value for the trait.
| |
index:int — The index to which the switch shall (or did) occur.
|
switchingChangeEnd | () | metodo |
protected function switchingChangeEnd(index:int):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Parametri
index:int — The index of the switched-to stream.
|
switchingChangeStart | () | metodo |
protected function switchingChangeStart(newSwitching:Boolean, index:int):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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.
Parametri
newSwitching:Boolean — New value for the switching property.
| |
index:int — The index of the stream to switch to.
|
switchTo | () | metodo |
public function switchTo(index:int):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni 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);
Parametri
index:int |
Genera
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.
|
Elementi API correlati
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 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.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.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 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, 02:44 PM Z