(Beta)
Package | org.osmf.net |
Class | public class RuleSwitchManagerBase |
Inheritance | RuleSwitchManagerBase NetStreamSwitchManagerBase EventDispatcher Object |
Subclasses | DefaultHTTPStreamingSwitchManager |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
SwitchManger manages the Adaptive Bitrate experience. It is responsible with putting all the required components together.
Related API Elements
org.osmf.net.abr.MetricBase
org.osmf.net.abr.RuleBase
org.osmf.net.abr.RuleBase
Public Properties
Property | Defined By | ||
---|---|---|---|
actualIndex : int [read-only]
The index of the currently downloading quality level
| RuleSwitchManagerBase | ||
autoSwitch : Boolean [override] | RuleSwitchManagerBase | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
currentIndex : uint [override] [read-only] | RuleSwitchManagerBase | ||
emergencyRules : Vector.<RuleBase> [read-only]
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 | ||
metricRepository : MetricRepository [read-only]
The metric repository responsible with providing the metrics
| RuleSwitchManagerBase |
Protected Properties
Public Methods
Method | Defined By | ||
---|---|---|---|
RuleSwitchManagerBase(notifier:EventDispatcher, switcher:NetStreamSwitcher, metricRepository:MetricRepository, emergencyRules:Vector.<RuleBase> = null, autoSwitch:Boolean = true)
Constructor. | RuleSwitchManagerBase | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Returns an index that satisfies the maxBitrate constraint
| RuleSwitchManagerBase | ||
Computes the necessary rules and metrics and determines the index to switch to. | RuleSwitchManagerBase | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
[override] | RuleSwitchManagerBase | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Property Detail
actualIndex | property |
autoSwitch | property |
currentIndex | property |
emergencyRules | property |
emergencyRules:Vector.<RuleBase>
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Array of normal rules to be used in the algorithm. An emergency rule can only recommend lower bitrates than the current one.
Implementation
public function get emergencyRules():Vector.<RuleBase>
metricRepository | property |
metricRepository:MetricRepository
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The metric repository responsible with providing the metrics
Implementation
public function get metricRepository():MetricRepository
Constructor Detail
RuleSwitchManagerBase | () | Constructor |
public function RuleSwitchManagerBase(notifier:EventDispatcher, switcher:NetStreamSwitcher, metricRepository:MetricRepository, emergencyRules:Vector.<RuleBase> = null, autoSwitch:Boolean = true)
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
Parametersnotifier: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
|
Method Detail
getNewEmergencyIndex | () | method |
getNewIndex | () | method |
public function getNewIndex():uint
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
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)
Returnsuint |
switchTo | () | method |
Wed Nov 21 2018, 06:34 AM -08:00