Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
org.osmf.net.httpstreaming 

DefaultHTTPStreamingSwitchManager  - AS3 OSMF

Pacchettoorg.osmf.net.httpstreaming
Classepublic class DefaultHTTPStreamingSwitchManager
EreditarietàDefaultHTTPStreamingSwitchManager Inheritance RuleSwitchManagerBase Inheritance NetStreamSwitchManagerBase Inheritance EventDispatcher Inheritance Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Default implementation of SwitchManagerBase

Elementi API correlati

org.osmf.net.abr.MetricBase
org.osmf.net.abr.RuleBase


Proprietà pubbliche
 ProprietàDefinito da
 InheritedactualIndex : int
[sola lettura] The index of the currently downloading quality level
RuleSwitchManagerBase
 InheritedautoSwitch : Boolean
[override]
RuleSwitchManagerBase
  climbFactor : Number
A factor to be applied when switching up.
DefaultHTTPStreamingSwitchManager
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
 InheritedcurrentIndex : uint
[override] [sola lettura]
RuleSwitchManagerBase
 InheritedemergencyRules : Vector.<RuleBase>
[sola lettura] Array of normal rules to be used in the algorithm.
RuleSwitchManagerBase
 InheritedmaxAllowedIndex : int
The highest stream index that the switching manager is allowed to switch to.
NetStreamSwitchManagerBase
  maxDownSwitchLimit : int
The maximum difference between the indices of the old and new quality level when switching down.
DefaultHTTPStreamingSwitchManager
  maxReliabilityRecordSize : uint
The maximum length of the reliability record (how many switches to remember)
DefaultHTTPStreamingSwitchManager
  maxUpSwitchLimit : int
The maximum difference between the indices of the old and new quality level when switching up.
DefaultHTTPStreamingSwitchManager
 InheritedmetricRepository : MetricRepository
[sola lettura] The metric repository responsible with providing the metrics
RuleSwitchManagerBase
  minReliability : Number
The minimum reliability for a quality level to be used.
DefaultHTTPStreamingSwitchManager
  minReliabilityRecordSize : uint
The minimum length of the reliability record below which reliability is not an issue
DefaultHTTPStreamingSwitchManager
  normalRules : Vector.<RuleBase>
[sola lettura] Array of normal rules to be used in the algorithm.
DefaultHTTPStreamingSwitchManager
  normalRuleWeights : Vector.<Number>
The weights of the normal rules (their importance in the algorithm). Valid values must obey the following rules: same number of weights as there are rules all rules must be equal or greater than zero at least one weight must be non-zero
DefaultHTTPStreamingSwitchManager
Metodi pubblici
 MetodoDefinito da
  
DefaultHTTPStreamingSwitchManager(notifier:EventDispatcher, switcher:NetStreamSwitcher, metricRepository:MetricRepository, emergencyRules:Vector.<RuleBase> = null, autoSwitch:Boolean = true, normalRules:Vector.<RuleBase> = null, normalRuleWeights:Vector.<Number> = null, minReliability:Number = 0.85, minReliabilityRecordSize:uint = 5, maxReliabilityRecordSize:uint = 30, climbFactor:Number = 0.9, maxUpSwitchLimit:int = 1, maxDownSwitchLimit:int = 2)
Constructor.
DefaultHTTPStreamingSwitchManager
 Inherited
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
 Inherited
Invia un evento nel flusso di eventi.
EventDispatcher
  
The current reliability of the specified index.
DefaultHTTPStreamingSwitchManager
  
[override] Returns an index that satisfies the maxBitrate constraint
DefaultHTTPStreamingSwitchManager
  
[override] Computes the necessary rules and metrics and determines the index to switch to.
DefaultHTTPStreamingSwitchManager
 Inherited
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento.
EventDispatcher
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Rimuove un listener dall'oggetto EventDispatcher.
EventDispatcher
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
[override]
RuleSwitchManagerBase
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
 Inherited
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato.
EventDispatcher
Metodi protetti
 MetodoDefinito da
  
getMaxIndex(maxBitrate:Number, emergencyFlag:Boolean = false):uint
Determines maximum available index whose declared bitrate is smaller than maxBitrate.
DefaultHTTPStreamingSwitchManager
  
Determines whether an index is reliable. This is achieved by comparing the index's reliability with the minimumReliability
DefaultHTTPStreamingSwitchManager
  
Array of normal rules to be used in the algorithm.
DefaultHTTPStreamingSwitchManager
Eventi
 Evento Riepilogo Definito da
 Inherited[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
 Inherited[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo.EventDispatcher
Descrizione delle proprietà

climbFactor

proprietà
climbFactor:Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

A factor to be applied when switching up. For example: currently playing 300kbps; new ideal bitrate = 1000kbps This means that: max bitrate = 300 + climbFactor x (1000 - 300)

It must be equal or greater than 0



Implementazione
    public function get climbFactor():Number
    public function set climbFactor(value:Number):void

Genera
ArgumentError — If it is set to a negative value

maxDownSwitchLimit

proprietà 
maxDownSwitchLimit:int

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The maximum difference between the indices of the old and new quality level when switching down. Set this to a -1 to disable the constraint.

This works in conjunction with the reliability constraint. If no reliable stream is available inside the maxDownSwitchLimit, no switch will be performed. The maxDownSwitchLimit constraint does not apply to emergency switches.



Implementazione
    public function get maxDownSwitchLimit():int
    public function set maxDownSwitchLimit(value:int):void

maxReliabilityRecordSize

proprietà 
maxReliabilityRecordSize:uint

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The maximum length of the reliability record (how many switches to remember)



Implementazione
    public function get maxReliabilityRecordSize():uint
    public function set maxReliabilityRecordSize(value:uint):void

maxUpSwitchLimit

proprietà 
maxUpSwitchLimit:int

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The maximum difference between the indices of the old and new quality level when switching up. Set this to a -1 to disable the constraint.

This works in conjunction with the reliability constraint. If no reliable stream is available inside the maxUpSwitchLlimit, no switch will be performed.



Implementazione
    public function get maxUpSwitchLimit():int
    public function set maxUpSwitchLimit(value:int):void

minReliability

proprietà 
minReliability:Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The minimum reliability for a quality level to be used. This value must be a number in the [0-1] interval (inclusive)



Implementazione
    public function get minReliability():Number
    public function set minReliability(value:Number):void

Genera
ArgumentError — If it is set to an invalid value

minReliabilityRecordSize

proprietà 
minReliabilityRecordSize:uint

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The minimum length of the reliability record below which reliability is not an issue



Implementazione
    public function get minReliabilityRecordSize():uint
    public function set minReliabilityRecordSize(value:uint):void

normalRules

proprietà 
normalRules:Vector.<RuleBase>  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Array of normal rules to be used in the algorithm. A normal rule can recommend both lower and higher bitrates than the current one



Implementazione
    public function get normalRules():Vector.<RuleBase>

normalRuleWeights

proprietà 
normalRuleWeights:Vector.<Number>

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The weights of the normal rules (their importance in the algorithm). Valid values must obey the following rules:

  • same number of weights as there are rules
  • all rules must be equal or greater than zero
  • at least one weight must be non-zero



Implementazione
    public function get normalRuleWeights():Vector.<Number>
    public function set normalRuleWeights(value:Vector.<Number>):void

Genera
ArgumentError — If the weights are not valid, by breaking at least one of the above criteria
Descrizione della funzione di costruzione

DefaultHTTPStreamingSwitchManager

()Funzione di costruzione
public function DefaultHTTPStreamingSwitchManager(notifier:EventDispatcher, switcher:NetStreamSwitcher, metricRepository:MetricRepository, emergencyRules:Vector.<RuleBase> = null, autoSwitch:Boolean = true, normalRules:Vector.<RuleBase> = null, normalRuleWeights:Vector.<Number> = null, minReliability:Number = 0.85, minReliabilityRecordSize:uint = 5, maxReliabilityRecordSize:uint = 30, climbFactor:Number = 0.9, maxUpSwitchLimit:int = 1, maxDownSwitchLimit:int = 2)

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Constructor.

Parametri
notifier:EventDispatcher — An object that dispatches the HTTPStreamingEvent.RUN_ALGORITHM event
 
switcher:NetStreamSwitcher — The NetStreamSwitcher to use for switching
 
metricRepository:MetricRepository — The repository responsible with providing metrics
 
emergencyRules:Vector.<RuleBase> (default = null) — Array of rules to be used in the algorithm. An emergency rule can only recommend lower bitrates than the current one.
 
autoSwitch:Boolean (default = true) — Flag deciding whether autoSwitch should be enabled
 
normalRules:Vector.<RuleBase> (default = null) — Array of normal rules to be used in the algorithm. A normal rule can recommend both lower and higher bitrates than the current one.
 
normalRuleWeights:Vector.<Number> (default = null) — The weights of the normal rules (their importance in the algorithm)
 
minReliability:Number (default = 0.85) — The minimum reliability for a quality level to be used
 
minReliabilityRecordSize:uint (default = 5) — The maximum length of the reliability record (how many switches to remember)
 
maxReliabilityRecordSize:uint (default = 30) — The minimum length of the reliability record below which reliability is not an issue
 
climbFactor:Number (default = 0.9) — A factor to be applied when switching up. For example: currently playing 300kbps; new ideal bitrate = 1000kbps This means that: max bitrate = 300 + climbFactor x (1000 - 300)
 
maxUpSwitchLimit:int (default = 1) — The maximum difference between the indices of the old and new quality level when switching up. Set this to -1 to disable the constraint. This works in conjunction with the reliability constraint. If no reliable stream is available inside the maxUpSwitchLimit, no switch will be performed.
 
maxDownSwitchLimit:int (default = 2) — The maximum difference between the indices of the old and new quality level when switching down. Set this to -1 value to disable the constraint. This works in conjunction with the reliability constraint. If no reliable stream is available inside the maxDownSwitchLimit, no switch will be performed. The maxDownSwitchLimit constraint does not apply to emergency switches.
Descrizione dei metodi

getCurrentReliability

()metodo
public function getCurrentReliability(index:uint):Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

The current reliability of the specified index.

Parametri

index:uint

Restituisce
Number — A number between 0 (most unreliable) and 1 (most reliable)

getMaxIndex

()metodo 
protected function getMaxIndex(maxBitrate:Number, emergencyFlag:Boolean = false):uint

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Determines maximum available index whose declared bitrate is smaller than maxBitrate. Only reliable indices (indices that pass the isReliable() function) are taken into consideration.

Parametri

maxBitrate:Number — The maximum bitrate to which the index must comply
 
emergencyFlag:Boolean (default = false)

Restituisce
uint — The index satisfying the aforementioned condition

Elementi API correlati

getNewEmergencyIndex

()metodo 
override public function getNewEmergencyIndex(maxBitrate:Number):uint

Returns an index that satisfies the maxBitrate constraint

Parametri

maxBitrate:Number

Restituisce
uint

getNewIndex

()metodo 
override public function getNewIndex():uint

Computes the necessary rules and metrics and determines the index to switch to. The index must be a valid one (it can be higher than maxAllowedIndex, but it should be a real index that is available)

Restituisce
uint

isReliable

()metodo 
protected function isReliable(index:uint):Boolean

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Determines whether an index is reliable. This is achieved by comparing the index's reliability with the minimumReliability

Parametri

index:uint

Restituisce
Boolean

Elementi API correlati

setNormalRules

()metodo 
protected function setNormalRules(value:Vector.<RuleBase>):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 2.0
Versioni runtime: Flash Player 10, AIR 1.5

Array of normal rules to be used in the algorithm. A normal rule can recommend both lower and higher bitrates than the current one.

Parametri

value:Vector.<RuleBase>

Elementi API correlati





[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.