Packagecom.akamai.utils
Classpublic class BandwidthEstimation
InheritanceBandwidthEstimation Inheritance flash.events.EventDispatcher

This class will stream a media file at a certain bit rate and determine the bandwidth based on bytes downloaded. The round trip time (RTT) to a sever has been eliminated from the test time. This may result and a slightly longer physical startup time than the time indicated by estimationPeriodInSeconds.



Public Properties
 PropertyDefined By
  estimationPeriodInSeconds : Number
The value of time in seconds that the test will last.
BandwidthEstimation
Public Methods
 MethodDefined By
  
BandwidthEstimation(url:String, estimationPeriodInSeconds:Number = 1)
If you pass in the url on instantiation then you do not need to call startEstimation as the test will explicitly start for you.
BandwidthEstimation
  
startEstimation(url:String):void
Pass in the url to the media file to test against to start the test.
BandwidthEstimation
Events
 Event Summary Defined By
  Dispatched once the test time is complete.BandwidthEstimation
  Dispatched on IO and Security error.BandwidthEstimation
Property Detail
estimationPeriodInSecondsproperty
estimationPeriodInSeconds:Number

The value of time in seconds that the test will last. A longer test interval may produce a more accurate test result but will effect the startup time of the stream.


Implementation
    public function get estimationPeriodInSeconds():Number
    public function set estimationPeriodInSeconds(value:Number):void
Constructor Detail
BandwidthEstimation()Constructor
public function BandwidthEstimation(url:String, estimationPeriodInSeconds:Number = 1)

If you pass in the url on instantiation then you do not need to call startEstimation as the test will explicitly start for you. It is recommended to not pass anything into the constructers argument field and to use the estimationPeriodInSeconds setter accessor to to set the test time in seconds and then start the test by calling startEstimation(url). The risk of passing in the url and automating the test start is, if you set the test period too short, you may produce a race condition between the end of the estimation and adding the listener for the test's completion.

Parameters
url:String — The url should be to a valid media file. If you are testing MBR with SMIL, do not use the url to the smil file. Rather, you should test against the highest encoded bit rate in the profile.
 
estimationPeriodInSeconds:Number (default = 1) — The value of time in seconds that the test will last. A longer test interval may produce a more accurate test result but will effect the startup time of the stream.
Method Detail
startEstimation()method
public function startEstimation(url:String):void

Pass in the url to the media file to test against to start the test.

Parameters

url:String — The url should be to a valid media file. If you are testing MBR with SMIL, do not use the url to the smil file. Rather, you should test against the highest encoded bit rate in the profile.

Event Detail
bandwidthEstimationComplete Event
Event Object Type: com.akamai.hd.HDEvent

Dispatched once the test time is complete. Payload (event.data.value) is bandwidth estimation in kbps.

error Event  
Event Object Type: com.akamai.hd.HDEvent

Dispatched on IO and Security error. Payload (event.data.value) is error text from original event.