Paket | org.osmf.net |
Klass | public class NetStreamSwitchManager |
Arv | NetStreamSwitchManager NetStreamSwitchManagerBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Egenskap | Definieras med | ||
---|---|---|---|
_autoSwitch : Boolean | NetStreamSwitchManagerBase | ||
bandwidthLimit : Number
The multiplier to apply to the maximum bandwidth for the client. | NetStreamSwitchManager | ||
_maxAllowedIndex : int | NetStreamSwitchManagerBase |
Metod | Definieras med | ||
---|---|---|---|
NetStreamSwitchManager(connection:NetConnection, netStream:NetStream, resource:DynamicStreamingResource, metrics:NetStreamMetricsBase, switchingRules:Vector.<SwitchingRuleBase>, autoSwitch:Boolean = true)
Constructor. | NetStreamSwitchManager | ||
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 | ||
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 | ||
Initiate a switch to the stream with the given index. | NetStreamSwitchManagerBase | ||
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 | ||
---|---|---|---|
Override this method to provide additional decisioning around
allowing automatic switches to occur. | NetStreamSwitchManager |
bandwidthLimit | egenskap |
NetStreamSwitchManager | () | Konstruktor |
public function NetStreamSwitchManager(connection:NetConnection, netStream:NetStream, resource:DynamicStreamingResource, metrics:NetStreamMetricsBase, switchingRules:Vector.<SwitchingRuleBase>, autoSwitch:Boolean = true)
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
Parametrarconnection:NetConnection — The NetConnection for the NetStream that will be managed.
| |
netStream:NetStream — The NetStream to manage.
| |
resource:DynamicStreamingResource — The DynamicStreamingResource that is playing in the NetStream.
| |
metrics:NetStreamMetricsBase — The provider of runtime metrics.
| |
switchingRules:Vector.<SwitchingRuleBase> — The switching rules that this manager will use.
| |
autoSwitch:Boolean (default = true )
|
canAutoSwitchNow | () | metod |
protected function canAutoSwitchNow(newIndex:int):Boolean
Override this method to provide additional decisioning around allowing automatic switches to occur. This method will be invoked just prior to a switch request. If false is returned, that switch request will not take place.
By default, the implementation does the following:
1) When a switch down occurs, the stream being switched from has its failed count incremented. If, when the switching rules are evaluated again, a rule suggests switching up, since the stream previously failed, it won't be tried again until a duration (30s) elapses. This provides a better user experience by preventing a situation where the switch up is attempted but then fails almost immediately.
2) Once a stream item has 3 failures, there will be no more attempts to switch to it until an interval (5m) has expired. At the end of this interval, all failed counts are reset to zero.
Parametrar
newIndex:int — The new index to switch to.
|
Boolean |
Tue Jun 12 2018, 01:40 PM Z