Paket | org.osmf.net.httpstreaming |
Klass | public class DefaultHTTPStreamingSwitchManager |
Arv | DefaultHTTPStreamingSwitchManager RuleSwitchManagerBase NetStreamSwitchManagerBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Relaterade API-element
org.osmf.net.abr.RuleBase
Egenskap | Definieras med | ||
---|---|---|---|
actualIndex : int [skrivskyddad]
The index of the currently downloading quality level
| RuleSwitchManagerBase | ||
autoSwitch : Boolean [åsidosätt] | RuleSwitchManagerBase | ||
climbFactor : Number
A factor to be applied when switching up. | DefaultHTTPStreamingSwitchManager | ||
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
currentIndex : uint [åsidosätt] [skrivskyddad] | RuleSwitchManagerBase | ||
emergencyRules : Vector.<RuleBase> [skrivskyddad]
Array of normal rules to be used in the algorithm. | RuleSwitchManagerBase | ||
maxAllowedIndex : 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 | ||
metricRepository : MetricRepository [skrivskyddad]
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> [skrivskyddad]
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 |
Metod | Definieras med | ||
---|---|---|---|
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 | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
The current reliability of the specified index. | DefaultHTTPStreamingSwitchManager | ||
[åsidosätt]
Returns an index that satisfies the maxBitrate constraint
| DefaultHTTPStreamingSwitchManager | ||
[åsidosätt]
Computes the necessary rules and metrics and determines the index to switch to. | DefaultHTTPStreamingSwitchManager | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
[åsidosätt] | RuleSwitchManagerBase | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
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 |
climbFactor | egenskap |
climbFactor:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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
Implementering
public function get climbFactor():Number
public function set climbFactor(value:Number):void
Utlöser
ArgumentError — If it is set to a negative value
|
maxDownSwitchLimit | egenskap |
maxDownSwitchLimit:int
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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.
Implementering
public function get maxDownSwitchLimit():int
public function set maxDownSwitchLimit(value:int):void
maxReliabilityRecordSize | egenskap |
maxReliabilityRecordSize:uint
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The maximum length of the reliability record (how many switches to remember)
Implementering
public function get maxReliabilityRecordSize():uint
public function set maxReliabilityRecordSize(value:uint):void
maxUpSwitchLimit | egenskap |
maxUpSwitchLimit:int
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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.
Implementering
public function get maxUpSwitchLimit():int
public function set maxUpSwitchLimit(value:int):void
minReliability | egenskap |
minReliability:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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)
Implementering
public function get minReliability():Number
public function set minReliability(value:Number):void
Utlöser
ArgumentError — If it is set to an invalid value
|
minReliabilityRecordSize | egenskap |
minReliabilityRecordSize:uint
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The minimum length of the reliability record below which reliability is not an issue
Implementering
public function get minReliabilityRecordSize():uint
public function set minReliabilityRecordSize(value:uint):void
normalRules | egenskap |
normalRules:Vector.<RuleBase>
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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
Implementering
public function get normalRules():Vector.<RuleBase>
normalRuleWeights | egenskap |
normalRuleWeights:Vector.<Number>
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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
Implementering
public function get normalRuleWeights():Vector.<Number>
public function set normalRuleWeights(value:Vector.<Number>):void
Utlöser
ArgumentError — If the weights are not valid,
by breaking at least one of the above criteria
|
DefaultHTTPStreamingSwitchManager | () | Konstruktor |
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)
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
Parametrarnotifier: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.
|
getCurrentReliability | () | metod |
public function getCurrentReliability(index:uint):Number
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The current reliability of the specified index.
Parametrar
index:uint |
Number — A number between 0 (most unreliable) and 1 (most reliable)
|
getMaxIndex | () | metod |
protected function getMaxIndex(maxBitrate:Number, emergencyFlag:Boolean = false):uint
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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.
Parametrar
maxBitrate:Number — The maximum bitrate to which the index must comply
| |
emergencyFlag:Boolean (default = false )
|
uint — The index satisfying the aforementioned condition
|
Relaterade API-element
getNewEmergencyIndex | () | metod |
getNewIndex | () | metod |
isReliable | () | metod |
protected function isReliable(index:uint):Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Determines whether an index is reliable. This is achieved by comparing the index's reliability with the minimumReliability
Parametrar
index:uint |
Boolean |
Relaterade API-element
setNormalRules | () | metod |
protected function setNormalRules(value:Vector.<RuleBase>):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | 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.
Parametrar
value:Vector.<RuleBase> |
Relaterade API-element
Tue Jun 12 2018, 01:40 PM Z