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.rules 

AfterUpSwitchBufferBandwidthRule  - AS3 OSMF

Packageorg.osmf.net.rules
Classpublic class AfterUpSwitchBufferBandwidthRule
InheritanceAfterUpSwitchBufferBandwidthRule Inheritance BufferBandwidthRule Inheritance BandwidthRule Inheritance RuleBase Inheritance Object

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

AfterUpSwitchBufferBandwidthRule is an emergency rule based on BufferBandwidthRule. It kicks in if the last fragment downloaded is higher quality than the previous one and it recommends a lower bitrate if the current quality is cleary unsustainable.

It works like the BufferBandwidthRule, only on a single fragment (the last downloaded) and only if that fragment is the first from a higher quality level. In addition to the BufferBandwidthRule, this rule will not kick in (will return a zero-confidence recommendation) if the bandwidth is above an acceptable level.



Public Properties
 PropertyDefined By
 InheritedbufferFragmentsThreshold : Number
The number of fragments in the buffer above which no lower bitrates are recomended. For example, assume the bandwidth has a value of 3000 kbps and the actual bitrate is 5000 kbps. If the number of fragments in the buffer is below the threshold, the rule will recommend 3000 kbps; otherwise, it will recommend 5000 kbps
BufferBandwidthRule
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedmetricRepository : MetricRepository
[read-only] The metric repository.
RuleBase
  minBandwidthToBitrateRatio : Number
The minimum acceptable value of the bandwidth / bitrate fraction. This is taken into consideration only if the bufferFragmentsThreshold constraint is not satisfied.
AfterUpSwitchBufferBandwidthRule
 Inheritedweights : Vector.<Number>
[read-only] The weights of the fragments (first values are the weights of the most recent fragments
BandwidthRule
Protected Properties
 PropertyDefined By
 Inherited_metricRepository : MetricRepository
RuleBase
Public Methods
 MethodDefined By
  
AfterUpSwitchBufferBandwidthRule(metricRepository:MetricRepository, bufferFragmentsThreshold:Number, minBandwidthToBitrateRatio:Number)
Constructor.
AfterUpSwitchBufferBandwidthRule
  
[override] The recommendation
AfterUpSwitchBufferBandwidthRule
 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

minBandwidthToBitrateRatio

property
minBandwidthToBitrateRatio:Number

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

The minimum acceptable value of the bandwidth / bitrate fraction. This is taken into consideration only if the bufferFragmentsThreshold constraint is not satisfied.



Implementation
    public function get minBandwidthToBitrateRatio():Number
    public function set minBandwidthToBitrateRatio(value:Number):void
Constructor Detail

AfterUpSwitchBufferBandwidthRule

()Constructor
public function AfterUpSwitchBufferBandwidthRule(metricRepository:MetricRepository, bufferFragmentsThreshold:Number, minBandwidthToBitrateRatio:Number)

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

Constructor.

Parameters
metricRepository:MetricRepository — The metric repository from which to retrieve the necessary metrics
 
bufferFragmentsThreshold:Number — The number of fragments in the buffer above which no lower bitrates are recomended. For example, assume the bandwidth has a value of 3000 kbps and the actual bitrate is 5000 kbps. If the number of fragments in the buffer is below the threshold, the rule will recommend 3000 kbps; otherwise, it will recommend 5000 kbps
 
minBandwidthToBitrateRatio:Number — The minimum acceptable value of the bandwidth / bitrate fraction. This is taken into consideration only if the bufferFragmentsThreshold constraint is not satisfied.
Method Detail

getRecommendation

()method
override public function getRecommendation():Recommendation

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

The recommendation

Returns
Recommendation