Package | com.akamai.utils |
Class | public class BandwidthEstimation |
Inheritance | BandwidthEstimation flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
estimationPeriodInSeconds : Number
The value of time in seconds that the test will last. | BandwidthEstimation |
Method | Defined 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 |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched once the test time is complete. | BandwidthEstimation | |||
Dispatched on IO and Security error. | BandwidthEstimation |
estimationPeriodInSeconds | property |
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.
public function get estimationPeriodInSeconds():Number
public function set estimationPeriodInSeconds(value:Number):void
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.
Parametersurl: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.
|
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.
|
bandwidthEstimationComplete | Event |
com.akamai.hd.HDEvent
Dispatched once the test time is complete. Payload (event.data.value) is bandwidth estimation in kbps.
error | Event |
com.akamai.hd.HDEvent
Dispatched on IO and Security error. Payload (event.data.value) is error text from original event.