ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
org.osmf.net 

SwitchingRuleBase  - AS3 OSMF

Packageorg.osmf.net
Classpublic class SwitchingRuleBase
InheritanceSwitchingRuleBase Inheritance Object
Subclasses DroppedFramesRule, InsufficientBandwidthRule, InsufficientBufferRule, SufficientBandwidthRule

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

SwitchingRuleBase is a base class for classes that define multi-bitrate (MBR) switching rules.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
Protected Properties
 PropertyDefined By
  metrics : NetStreamMetricsBase
[read-only] The provider of metrics which the rule can use to determine whether to suggest a switch.
SwitchingRuleBase
Public Methods
 MethodDefined By
  
Constructor.
SwitchingRuleBase
  
Returns the index value in the active DynamicStreamingResource to which this switching rule thinks the bitrate should shift.
SwitchingRuleBase
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

metrics

property
metrics:NetStreamMetricsBase  [read-only]

The provider of metrics which the rule can use to determine whether to suggest a switch.



Implementation
    protected function get metrics():NetStreamMetricsBase
Constructor Detail

SwitchingRuleBase

()Constructor
public function SwitchingRuleBase(metrics:NetStreamMetricsBase)

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Constructor.

Parameters
metrics:NetStreamMetricsBase — Provider of runtime metrics.
Method Detail

getNewIndex

()method
public function getNewIndex():int

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns the index value in the active DynamicStreamingResource to which this switching rule thinks the bitrate should shift. It's up to the calling function to act on this. This index will range in value from -1 to n-1,where n is the number of bitrate items available. A value of -1 means that this rule does not suggest a switch away from the current item. A value from 0 to n-1 indicates that the caller should switch to that index immediately.

Returns
int