套件 | org.osmf.net |
類別 | public class RuleSwitchManagerBase |
繼承 | RuleSwitchManagerBase NetStreamSwitchManagerBase EventDispatcher Object |
子類別 | DefaultHTTPStreamingSwitchManager |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
SwitchManger manages the Adaptive Bitrate experience. It is responsible with putting all the required components together.
相關 API 元素
org.osmf.net.abr.MetricBase
org.osmf.net.abr.RuleBase
org.osmf.net.abr.RuleBase
公用屬性
屬性 | 定義自 | ||
---|---|---|---|
actualIndex : int [唯讀]
The index of the currently downloading quality level
| RuleSwitchManagerBase | ||
autoSwitch : Boolean [覆寫] | RuleSwitchManagerBase | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
currentIndex : uint [覆寫] [唯讀] | RuleSwitchManagerBase | ||
emergencyRules : Vector.<RuleBase> [唯讀]
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 [唯讀]
The metric repository responsible with providing the metrics
| RuleSwitchManagerBase |
公用方法
方法 | 定義自 | ||
---|---|---|---|
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
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
Returns an index that satisfies the maxBitrate constraint
| RuleSwitchManagerBase | ||
Computes the necessary rules and metrics and determines the index to switch to. | RuleSwitchManagerBase | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
[覆寫] | RuleSwitchManagerBase | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
屬性詳細資訊
actualIndex | 屬性 |
autoSwitch | 屬性 |
currentIndex | 屬性 |
emergencyRules | 屬性 |
metricRepository | 屬性 |
metricRepository:MetricRepository
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The metric repository responsible with providing the metrics
實作
public function get metricRepository():MetricRepository
建構函式詳細資料
RuleSwitchManagerBase | () | 建構函式 |
public function RuleSwitchManagerBase(notifier:EventDispatcher, switcher:NetStreamSwitcher, metricRepository:MetricRepository, emergencyRules:Vector.<RuleBase> = null, autoSwitch:Boolean = true)
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數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
|
方法詳細資訊
getNewEmergencyIndex | () | 方法 |
getNewIndex | () | 方法 |
public function getNewIndex():uint
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | 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)
傳回值uint |
switchTo | () | 方法 |
Tue Jun 12 2018, 03:47 PM Z