| Package | com.akamai.net.f4f.hds |
| Class | public class AkamaiStreamController |
| Inheritance | AkamaiStreamController flash.events.EventDispatcher |
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
| Property | Defined By | ||
|---|---|---|---|
| actualIndex : int [read-only]
The current index being downloaded. | AkamaiStreamController | ||
| addManifestQueryArgsToFragmentRequests : Boolean
If set true, then any query args attached to the manifest request will be added to all subsequent fragment requests. | AkamaiStreamController | ||
| alternativeAudioStreamSwitching : Boolean [read-only]
Indicates whether or not an alternative audio stream switch is currently
in progress. | AkamaiStreamController | ||
| analyticsBeacon : String
Activates the built-in Akamai Client Side Media Analytics (CSMA) plugin, by specifying the beacon path
the plugin should track against. | AkamaiStreamController | ||
| analyticsPluginLoaderInstance : AnalyticsPluginLoader
This function can be used to set an explicit instance of AnalyticsPluginLoader
class which is created in the player. | AkamaiStreamController | ||
| audioPan : Number
Pan property of the media. | AkamaiStreamController | ||
| autoPlay : Boolean
Indicates whether the media starts playing right away after calling
the play method and as soon as the media has been loaded. | AkamaiStreamController | ||
| autoRewind : Boolean
Indicates whether media is returned to the beginning after playback completes. | AkamaiStreamController | ||
| averageBandwidth : Number [read-only]
Returns the bandwidth estimate, in kbps, averaged over the last 2 segments. | AkamaiStreamController | ||
| bandwidth : Number [read-only]
The estimated bandwidth, in kbps, over which the last fragment was downloaded. | AkamaiStreamController | ||
| bufferLengthAtLiveEOS : Number [read-only]
Value of the buffer length when live playback ends. | AkamaiStreamController | ||
| bufferProfile : String
Two different buffer profiles can be set:
AkamaiBufferProfileTypes.LIVE_LOW_LATENCY - provides the lowest "hand-waving latency" possible.
AkamaiBufferProfileTypes.LIVE_STABLE (default) - provides a more stable buffer.
| AkamaiStreamController | ||
| canPause : Boolean [read-only]
Indicates whether the media can be paused. | AkamaiStreamController | ||
| canSeek : Boolean [read-only]
Indicates whether the media is seekable. | AkamaiStreamController | ||
| captionType : String
Sets the captionType on the streamController for intended captioning. | AkamaiStreamController | ||
| captionURL : String
Takes a URL to the supported caption format used for closed captioning. | AkamaiStreamController | ||
| currentAlternativeAudioStreamIndex : int [read-only]
The index of the alternative audio stream currently in use. | AkamaiStreamController | ||
| currentIndex : int [read-only]
The currently rendered index. | AkamaiStreamController | ||
| currentTimeUpdateInterval : Number
Interval between the dispatch of the TimeEvent.CURRENT_TIME_CHANGE
event in milliseconds. | AkamaiStreamController | ||
| DFXPCaptionURL : String
[DEPRECATED] - this property is maintained only to ensure backwards compatibility. | AkamaiStreamController | ||
| displayObject : DisplayObject
Registers an instance of any display object with the NetStream. | AkamaiStreamController | ||
| downloadRatio : Number [read-only]
The ratio of the time it took to download the last fragment to the duration of video held within that fragment. | AkamaiStreamController | ||
| drmEndDate : Date [read-only]
Returns the end date for the playback window. | AkamaiStreamController | ||
| drmPeriod : Number [read-only]
Returns the length of the playback window, in seconds. | AkamaiStreamController | ||
| drmStartDate : Date [read-only]
Returns the start date for the playback window. | AkamaiStreamController | ||
| drmState : String [read-only]
The current state of the DRM for the media. | AkamaiStreamController | ||
| duration : Number [read-only]
Duration of the media's playback, in seconds. | AkamaiStreamController | ||
| durationAsUTC : Number [read-only]
Returns the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970. | AkamaiStreamController | ||
| dvrAvailability : String [read-only]
A string value denoting the dvr availability mode of the current stream. | AkamaiStreamController | ||
| effectiveBitrate : Number [read-only]
Returns the effective bitrate of the last fragment loaded, in kbps. | AkamaiStreamController | ||
| enableAlternateServerMapping : Boolean
Enables an Akamai feature called Alternate Server Mapping which can provide
improved performance when edge servers are slow to respond to fragment
requests. | AkamaiStreamController | ||
| enableBestEffortDownloadOnFragmentError : Boolean
If enableBestEffortDownloadOnFragmentError is set to true, stream reconnect logic is initiated after unsuccessful
attempts of fragment retry due to IOError or Data Gap. | AkamaiStreamController | ||
| enableEndUserMapping : Boolean
Enables an Akamai feature called End User IP Mapping which can provide
improved performance by mapping a user to the closest edge server possible. | AkamaiStreamController | ||
| enableLargeBuffersForLongFormContent : Boolean
If set true, then large buffer targets of 60s (for intermediate bitrates) and 300s (for max bitrates) are
used for long form content, defined as any VOD stream having a duration longer than 10min. | AkamaiStreamController | ||
| enableLocalSharedObject : Boolean
Setting to true (the default value) allows Akamai to
store data in a Flash Shared Object (a Flash cookie). | AkamaiStreamController | ||
| enableLogStringOnFragments : Boolean
A log string is usually appended to each fragment request, allowing QoS stats to be collected on the server. | AkamaiStreamController | ||
| enableSSLTransfer : Boolean | AkamaiStreamController | ||
| encrypted : Boolean [read-only]
Returns true if the current stream is encrypted with Akamai Media Encryption
| AkamaiStreamController | ||
| fragmentRetryAttemptsForLostConnectivity : Number
The number of times the class will retry a fragment when all
client connectivity has been lost. | AkamaiStreamController | ||
| fragmentRetryDataGapThreshold : Number
We measure the time it takes from the initial request until we receive the first byte of data per fragment
download. | AkamaiStreamController | ||
| hasAlternativeAudio : Boolean [read-only]
Indicates whether the media has alternative audio streams or not. | AkamaiStreamController | ||
| hasAudio : Boolean [read-only]
Indicates whether the media has audio. | AkamaiStreamController | ||
| hasDRM : Boolean [read-only]
Returns true if the media is DRM protected. | AkamaiStreamController | ||
| holdbackFromLive : Number
Use this property to set the holdback value from live point for limited-DVR and unlimited DVR live streams with a LIVE_STABLE buffer profile. | AkamaiStreamController | ||
| isBuffering : Boolean [read-only]
If set true, the netstream is in a buffering state. | AkamaiStreamController | ||
| isDVRRecording : Boolean [read-only]
Returns true if the media is DVR-enabled and currently recording, false if
the media is either not DVR-enabled, or is DVR-enabled but not currently
recording. | AkamaiStreamController | ||
| isDynamicStream : Boolean [read-only]
Indicates whether the media consists of a dynamic stream. | AkamaiStreamController | ||
| isLiveStream : Boolean [read-only]
Specifies whether the current stream is live or not
| AkamaiStreamController | ||
| isPaused : Boolean [read-only]
Returns true if the stream is paused and false if not. | AkamaiStreamController | ||
| isPlaying : Boolean [read-only]
Indicates whether the media is currently playing. | AkamaiStreamController | ||
| isPlayingLive : Boolean [read-only]
Specifies whether the stream is within bounds (60s) of the live point. | AkamaiStreamController | ||
| isSeeking : Boolean [read-only]
Indicates whether the media is currently seeking. | AkamaiStreamController | ||
| isSwitching : Boolean [read-only]
Indicates whether or not a dynamic stream switch is currently in progress. | AkamaiStreamController | ||
| limitMaxSwitchingIndexToPlayerDimensions : Boolean
CR 3087291
By setting the limitMaxSwitchingIndexToPlayerDimensions boolean to true, the player can limit the maximum allowed index
to a video height that does not exceed the player dimensions. | AkamaiStreamController | ||
| loop : Boolean
Indicates whether the media should play again after playback has completed. | AkamaiStreamController | ||
| manualSwitchMode : Boolean
Indicates whether or not the media will automatically switch between
dynamic streams. | AkamaiStreamController | ||
| maxAllowedIndex : int
The max allowed index in the current rendition set. | AkamaiStreamController | ||
| maxBestEffortDownloadAttemptsOnFragmentError : Number
When fragment download fails due to IOError or data gap, the fragment retry logic kicks in. | AkamaiStreamController | ||
| maximumBitrateAllowed : Number
When switching multi-bitrate content in auto switching mode, this property specifies the maximum stream bitrate in kbps the
class is allowed to play. | AkamaiStreamController | ||
| mediaHeight : Number [read-only]
Intrinsic height of the media, in pixels. | AkamaiStreamController | ||
| mediaWidth : Number [read-only]
Intrinsic width of the media, in pixels. | AkamaiStreamController | ||
| minimumBitrateAllowed : Number
When switching multi-bitrate content in auto switching mode, this property specifies the minimum stream bitrate in kbps
for the content. | AkamaiStreamController | ||
| muted : Boolean
Indicates whether the media is currently muted. | AkamaiStreamController | ||
| netSessionMode : String
Sets the operation mode for NetSession (HDClient) interaction. | AkamaiStreamController | ||
| netStream : NetStream [read-only]
Returns the current instance of the NetStream class. | AkamaiStreamController | ||
| numDynamicStreams : int [read-only]
The total number of dynamic stream indices. | AkamaiStreamController | ||
| playerDimensions : Object
CR 3087291
This property operates only when the limitMaxSwitchingIndexToPlayerDimensions property is set to true. | AkamaiStreamController | ||
| preloadDecryptionSWF : Boolean
Set this to true if you know you are playing encrypted media and would like to start playback as fast as possible. | AkamaiStreamController | ||
| preventSwitchDownOnDroppedFrames : Boolean
Jira HDCore-133
Jira HDCORE-128
If this property is set, the HDS DroppedFPSRule will not force an emergency switchdown in the
requested fragments. | AkamaiStreamController | ||
| qualityOfExperience : Number [read-only]
The quality of experience metric is a single number (with a range of 0-100) which attempts to sum up the quality of the playback experience. | AkamaiStreamController | ||
| resource : String [read-only]
Returns a URL of the media file. | AkamaiStreamController | ||
| resumeDVRAtLive : Boolean
Used to determine how a resume is handled after a "Limited DVR" stream is paused beyond the DVR Window. | AkamaiStreamController | ||
| rollingEndOffset : Number [read-only]
The rolling end offset, in seconds. | AkamaiStreamController | ||
| sbrBitrate : Number [read-only]
Returns the bitrate of the stream in case of single bitrate stream. | AkamaiStreamController | ||
| serverIP : String [read-only]
Returns the server IP address once the stream
is playing. | AkamaiStreamController | ||
| startingBitrate : Number
Sets the max bitrate value you wish to use at startup in kbps. | AkamaiStreamController | ||
| startingIndex : Number
The starting index to use when playing multi-bitrate content. | AkamaiStreamController | ||
| streamType : String [read-only]
Returns the type of the stream. | AkamaiStreamController | ||
| temporal : Boolean [read-only]
Indicates whether the media is temporal. | AkamaiStreamController | ||
| time : Number [read-only]
Current time of the playhead in seconds. | AkamaiStreamController | ||
| timeAsUTC : Number [read-only]
Returns the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970. | AkamaiStreamController | ||
| totalAlternativeAudioIndices : int [read-only]
Returns the total number of alternative audio streams or 0
if there are no alternative audio streams present. | AkamaiStreamController | ||
| usingNetSession : Boolean [read-only]
Returns true if the class is currently using NetSession to request fragments. | AkamaiStreamController | ||
| vbrRatio : Number [read-only]
Returns an estimate of the degree of VBR (variable bitrate encoding) encountered in the current content. | AkamaiStreamController | ||
| volume : Number
Volume of the media. | AkamaiStreamController | ||
| Method | Defined By | ||
|---|---|---|---|
Constructor. | AkamaiStreamController | ||
analyticsSetData(key:String, value:Object):void
Calls AnalyticsPluginLoader.setData with the
key/value pair provided to the method. | AkamaiStreamController | ||
authenticate(username:String = null, password:String = null):void
Authenticates the media. | AkamaiStreamController | ||
authenticateWithToken(token:Object):void
Authenticates the media using an object which serves as a token. | AkamaiStreamController | ||
closeAndDestroy():void
Cleans up the class completely. | AkamaiStreamController | ||
convertToUTC(value:Number):Number
Returns the time in seconds since midnight UTC, Jan 1 1970, corresponding to the input number of relative seconds. | AkamaiStreamController | ||
getAlternativeAudioItemAt(index:int):StreamingItem
Obtains the alternative audio stream corresponding to the specified
(0-based) index. | AkamaiStreamController | ||
getBitrateAtQualitylevel(value:uint):Number
Gets the associated bitrate, in kilobytes for the specified dynamic stream index. | AkamaiStreamController | ||
getStreamNameAtQualityLevel(value:uint):String
Returns the name of a stream at the index value supplied only after play has been called and only if is dynamic stream, Otherwise it returns null. | AkamaiStreamController | ||
pause():void
Pauses the media, if it is not already paused. | AkamaiStreamController | ||
play(... args):void
The play method initiates playback of a piece of media. | AkamaiStreamController | ||
requestAMDLongTokenForManifestURL(url:String):void
Jira HDCORE-141
Set the requestAMDLongToken property to true if the HDS stream is of AMD VoD type and token authentication is activated
in the SecureHD policy. | AkamaiStreamController | ||
resume():void
Resumes the media from a paused state. | AkamaiStreamController | ||
seek(value:Number):void
Instructs the playhead to jump to the specified time. | AkamaiStreamController | ||
stop():void
Immediately halts playback and returns the playhead to the beginning
of the media file. | AkamaiStreamController | ||
switchAlternativeAudioIndex(index:int):void
Changes the current audio stream to the alternative audio stream specified by a
0-based index value. | AkamaiStreamController | ||
switchTo(value:int):void
Switch to a specific dynamic stream index. | AkamaiStreamController | ||
timeCode(value:Number):String
A utility method which converts seconds into TimeCode. | AkamaiStreamController | ||
unloadMedia():void
Unloads the media completely, requiring a new call
to the play method. | AkamaiStreamController | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the long token request for an AMD VoD stream returns with a valid response body. | AkamaiStreamController | |||
| Dispatched when a stream has played to completion. | AkamaiStreamController | |||
| Dispatched when a DRM protected stream requires a token to authenticate. | AkamaiStreamController | |||
| Dispatched when an error which impacts the operation of media playback occurs. | AkamaiStreamController | |||
| Dispatched when the hasAlternativeAudio property has changed. | AkamaiStreamController | |||
| Dispatched with the HTTP status code of each fragment before a complete/error. | AkamaiStreamController | |||
| Dispatched when the buffering state of the media changes. | AkamaiStreamController | |||
| Dispatched after the stream has been loaded and determined to be a live stream. | AkamaiStreamController | |||
| Dispatched when the isPlayingLive property changes state. | AkamaiStreamController | |||
| Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the duration offset of one of the TimelineMarkers in this TimelineMetadata. | AkamaiStreamController | |||
| Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the time value of one of the TimelineMarkers in this TimelineMetadata. | AkamaiStreamController | |||
| Dispatched when the netStream property is ready for use (meaning it will return a non-null object). | AkamaiStreamController | |||
| Dispatched during the life of the stream with an interval of 100ms. | AkamaiStreamController | |||
| Dispatched when a DRM protected stream requires a username and password to authenticate. | AkamaiStreamController | |||
| Dispatched when stream duration has been determined. | AkamaiStreamController | |||
| For dynamic streaming, indicates the switch is complete and is visible to the user. | AkamaiStreamController | |||
| For dynamic streaming, dispatched when either a manual switch has been requested or a switching rule has requested a switch to a new index. | AkamaiStreamController | |||
| actualIndex | property |
actualIndex:int [read-only] The current index being downloaded.
public function get actualIndex():int| addManifestQueryArgsToFragmentRequests | property |
addManifestQueryArgsToFragmentRequests:BooleanIf set true, then any query args attached to the manifest request will be added to all subsequent fragment requests. Default value is true.
public function get addManifestQueryArgsToFragmentRequests():Boolean public function set addManifestQueryArgsToFragmentRequests(value:Boolean):void| alternativeAudioStreamSwitching | property |
alternativeAudioStreamSwitching:Boolean [read-only]
Indicates whether or not an alternative audio stream switch is currently
in progress.
This property will return true while an audio stream switch
has been requested and the switch has not yet been acknowledged and no
switch failure has occurred. Once the switch request has been acknowledged
or a failure occurs, the property will return false.
public function get alternativeAudioStreamSwitching():Boolean| analyticsBeacon | property |
analyticsBeacon:StringActivates the built-in Akamai Client Side Media Analytics (CSMA) plugin, by specifying the beacon path the plugin should track against. To turn-off the tracking after enabling it, pass the empty string ("") as the value. This property greatly simplifies integration with CSMA, by only requiring this single point of activation.
The beacon path is something you would obtain from your Akamai CSMA account manager after you have established a CSMA account.
The default value is true.
public function get analyticsBeacon():String public function set analyticsBeacon(value:String):void| analyticsPluginLoaderInstance | property |
analyticsPluginLoaderInstance:AnalyticsPluginLoaderThis function can be used to set an explicit instance of AnalyticsPluginLoader class which is created in the player. This is useful with the integrating of pre-roll advertisements.
public function get analyticsPluginLoaderInstance():AnalyticsPluginLoader public function set analyticsPluginLoaderInstance(value:AnalyticsPluginLoader):void| audioPan | property |
audioPan:NumberPan property of the media. Ranges from -1 (full pan left) to 1 (full pan right).
If the media does not have audio, then the pan property will be set to this value as soon as the media has audio.
public function get audioPan():Number public function set audioPan(value:Number):void| autoPlay | property |
autoPlay:Boolean
Indicates whether the media starts playing right away after calling
the play method and as soon as the media has been loaded.
The default is true.
false call the resume method
after calling the play method once the media has been loaded. Listening
for the AkamaiHDSEvent.NETSTREAM_READY event will ensure
the media has been loaded and is ready to resume.
public function get autoPlay():Boolean public function set autoPlay(value:Boolean):voidSee also
| autoRewind | property |
autoRewind:Boolean
Indicates whether media is returned to the beginning after playback completes.
If true, when playback completes, the player displays the first
frame of the media. If false, when playback completes, the last
frame is displayed. The default is true. The autoRewind
property is ignored if the loop property is set to true.
public function get autoRewind():Boolean public function set autoRewind(value:Boolean):void| averageBandwidth | property |
averageBandwidth:Number [read-only] Returns the bandwidth estimate, in kbps, averaged over the last 2 segments. The bandwidth property gives the bandwidth estimated over the last downloaded fragment.
public function get averageBandwidth():Number| bandwidth | property |
bandwidth:Number [read-only] The estimated bandwidth, in kbps, over which the last fragment was downloaded. Only holds a meaningful value of the first fragment has been fully downloaded.
public function get bandwidth():Number| bufferLengthAtLiveEOS | property |
bufferLengthAtLiveEOS:Number [read-only] Value of the buffer length when live playback ends. This returns the amount of content still left in the buffer, when live streaming stops or in case the encoder ends abruptly.
public function get bufferLengthAtLiveEOS():Number| bufferProfile | property |
bufferProfile:StringTwo different buffer profiles can be set:
public function get bufferProfile():String public function set bufferProfile(value:String):voidSee also
| canPause | property |
canPause:Boolean [read-only] Indicates whether the media can be paused.
public function get canPause():Boolean| canSeek | property |
canSeek:Boolean [read-only] Indicates whether the media is seekable.
public function get canSeek():Boolean| captionType | property |
captionType:StringSets the captionType on the streamController for intended captioning.
public function get captionType():String public function set captionType(value:String):voidSee also
| captionURL | property |
captionURL:StringTakes a URL to the supported caption format used for closed captioning. You can listen for the events TimelineMetadataEvent.MARKER_TIME_REACHED and TimelineMetadataEvent.MARKER_DURATION_REACHED dispatched from this class. The captionType is ideally set before setting the captionURL on the controller. Depending on the captionType and captionURL set, the appropriate captioning plugin is loaded by HDCore.
public function get captionURL():String public function set captionURL(value:String):voidSee also
| currentAlternativeAudioStreamIndex | property |
currentAlternativeAudioStreamIndex:int [read-only]
The index of the alternative audio stream currently in use. Returns the
0-based index of the selected stream, or -1 if no stream
is selected.
public function get currentAlternativeAudioStreamIndex():int| currentIndex | property |
currentIndex:int [read-only] The currently rendered index.
public function get currentIndex():int| currentTimeUpdateInterval | property |
currentTimeUpdateInterval:Number
Interval between the dispatch of the TimeEvent.CURRENT_TIME_CHANGE
event in milliseconds.
The default is 250 milliseconds. A non-positive value disables the dispatch of the time change events.
public function get currentTimeUpdateInterval():Number public function set currentTimeUpdateInterval(value:Number):void| DFXPCaptionURL | property |
DFXPCaptionURL:String[DEPRECATED] - this property is maintained only to ensure backwards compatibility. Use 'captionType' and 'captionURL' instead to set the type and URL for a caption. Takes a URL to the DFXP content file used for closed captioning. You can listen for the events TimelineMetadataEvent.MARKER_TIME_REACHED and TimelineMetadataEvent.MARKER_DURATION_REACHED dispatched from this class.
public function get DFXPCaptionURL():String public function set DFXPCaptionURL(value:String):voidSee also
| displayObject | property |
displayObject:DisplayObjectRegisters an instance of any display object with the NetStream. This property must be set before play is called against a resource that will implement player verification.
public function get displayObject():DisplayObject public function set displayObject(value:DisplayObject):void| downloadRatio | property |
downloadRatio:Number [read-only] The ratio of the time it took to download the last fragment to the duration of video held within that fragment. Only holds a meaningful value of the first fragment has been fully downloaded.
public function get downloadRatio():Number| drmEndDate | property |
drmEndDate:Date [read-only] Returns the end date for the playback window. Returns null if authentication hasn't taken place or if if hasDRM is false.
public function get drmEndDate():Date| drmPeriod | property |
drmPeriod:Number [read-only] Returns the length of the playback window, in seconds. Returns NaN if authentication hasn't taken place or if hasDRM is false. Note that this property will generally be the difference between startDate and endDate, but is included as a property because there may be times where the duration is known up front, but the start or end dates are not (e.g. a one week rental).
public function get drmPeriod():Number| drmStartDate | property |
drmStartDate:Date [read-only] Returns the start date for the playback window. Returns null if authentication hasn't taken place or if hasDRM is false.
public function get drmStartDate():Date| drmState | property |
drmState:String [read-only] The current state of the DRM for the media. The states are explained in the DRMState enumeration in the org.osmf.drm package. Returns DRMState.UNINITIALIZED if hasDRM is false.
public function get drmState():String| duration | property |
duration:Number [read-only] Duration of the media's playback, in seconds.
public function get duration():Number| durationAsUTC | property |
durationAsUTC:Number [read-only] Returns the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970. Note - this property only has meaning for live streams, or streams which were once live. The streambaseTime property must be >0 for this property to have meaning. A value of NaN will be returned if streambaseTime is 0.
public function get durationAsUTC():Number| dvrAvailability | property |
dvrAvailability:String [read-only] A string value denoting the dvr availability mode of the current stream. This can be one of the DVR_AVAILABILITY types found in AkamaiStreamType.
public function get dvrAvailability():StringSee also
| effectiveBitrate | property |
effectiveBitrate:Number [read-only] Returns the effective bitrate of the last fragment loaded, in kbps. The effective bitrate represents the size of the last fragment divided by the play time it represents. For CBR encoded content, this should be close to the target bitrate for the current rendition. if it is different from the target bitrate bitrate, then it indicates that VBR encoding is being encountered. Note that the last fragment loaded is not the fragment currently playing. The two are separated by the current buffer length.
Before the first fragment has loaded, property value will return NaN. public function get effectiveBitrate():Number| enableAlternateServerMapping | property |
enableAlternateServerMapping:BooleanEnables an Akamai feature called Alternate Server Mapping which can provide improved performance when edge servers are slow to respond to fragment requests.
See your Akamai account rep for information on this feature. Once your account is set up for Alternate Server Mapping, calling this method is all that is required from the player-side to enable it. public function get enableAlternateServerMapping():Boolean public function set enableAlternateServerMapping(value:Boolean):void| enableBestEffortDownloadOnFragmentError | property |
enableBestEffortDownloadOnFragmentError:BooleanIf enableBestEffortDownloadOnFragmentError is set to true, stream reconnect logic is initiated after unsuccessful attempts of fragment retry due to IOError or Data Gap. Best effort attempts are made to download the next valid fragment ahead of the current invalid fragment. Value: Boolean Default: True
public function get enableBestEffortDownloadOnFragmentError():Boolean public function set enableBestEffortDownloadOnFragmentError(value:Boolean):void| enableEndUserMapping | property |
enableEndUserMapping:BooleanEnables an Akamai feature called End User IP Mapping which can provide improved performance by mapping a user to the closest edge server possible.
See your Akamai account rep for information on this feature. Once your account is set up for End User IP Mapping, calling this method is all that is required from the player-side to enable it. public function get enableEndUserMapping():Boolean public function set enableEndUserMapping(value:Boolean):void| enableLargeBuffersForLongFormContent | property |
enableLargeBuffersForLongFormContent:BooleanIf set true, then large buffer targets of 60s (for intermediate bitrates) and 300s (for max bitrates) are used for long form content, defined as any VOD stream having a duration longer than 10min.
Default is true. public function get enableLargeBuffersForLongFormContent():Boolean public function set enableLargeBuffersForLongFormContent(value:Boolean):void| enableLocalSharedObject | property |
enableLocalSharedObject:Boolean
Setting to true (the default value) allows Akamai to
store data in a Flash Shared Object (a Flash cookie).
Setting to false means Akamai will not read or write data
from/to any Flash Shared Object.
The default value is true.
public function get enableLocalSharedObject():Boolean public function set enableLocalSharedObject(value:Boolean):void| enableLogStringOnFragments | property |
enableLogStringOnFragments:BooleanA log string is usually appended to each fragment request, allowing QoS stats to be collected on the server. If you are trying to cache the fragments within a network, then you can turn off the "als" query arg by setting this property to false.
The default value is true.
public function get enableLogStringOnFragments():Boolean public function set enableLogStringOnFragments(value:Boolean):void| enableSSLTransfer | property |
enableSSLTransfer:Boolean public function get enableSSLTransfer():Boolean public function set enableSSLTransfer(value:Boolean):void| encrypted | property |
encrypted:Boolean [read-only] Returns true if the current stream is encrypted with Akamai Media Encryption
public function get encrypted():Boolean| fragmentRetryAttemptsForLostConnectivity | property |
fragmentRetryAttemptsForLostConnectivity:NumberThe number of times the class will retry a fragment when all client connectivity has been lost. The default is 60.
public function get fragmentRetryAttemptsForLostConnectivity():Number public function set fragmentRetryAttemptsForLostConnectivity(value:Number):void| fragmentRetryDataGapThreshold | property |
fragmentRetryDataGapThreshold:NumberWe measure the time it takes from the initial request until we receive the first byte of data per fragment download. If we exceed this value we consider it a timeout and move onto the retry logic for the fragment. If Alternate Server Mapping / End User IP Mapping is enabled, this value will only apply if playing on alternate server for fragment retry logic and will be overridden by the value delivered in the Ident.xml if playing on primary host. The default is 20 seconds. We suggest not setting this value below 5 seconds. Anything below 20 seconds is more aggressive and may result in more stream not found errors. A higher value may result in more rebuffers.
public function get fragmentRetryDataGapThreshold():Number public function set fragmentRetryDataGapThreshold(value:Number):voidSee also
| hasAlternativeAudio | property |
hasAlternativeAudio:Boolean [read-only] Indicates whether the media has alternative audio streams or not.
public function get hasAlternativeAudio():Boolean| hasAudio | property |
hasAudio:Boolean [read-only] Indicates whether the media has audio.
public function get hasAudio():Boolean| hasDRM | property |
hasDRM:Boolean [read-only]
Returns true if the media is DRM protected.
public function get hasDRM():Boolean| holdbackFromLive | property |
holdbackFromLive:NumberUse this property to set the holdback value from live point for limited-DVR and unlimited DVR live streams with a LIVE_STABLE buffer profile. This value needs to be in the range of 10 - 60 secs. It defaults to 10 secs and will be reset to that value for No DVR streams.
public function get holdbackFromLive():Number public function set holdbackFromLive(value:Number):void| isBuffering | property |
isBuffering:Boolean [read-only] If set true, the netstream is in a buffering state.
public function get isBuffering():Boolean| isDVRRecording | property |
isDVRRecording:Boolean [read-only] Returns true if the media is DVR-enabled and currently recording, false if the media is either not DVR-enabled, or is DVR-enabled but not currently recording.
public function get isDVRRecording():Boolean| isDynamicStream | property |
isDynamicStream:Boolean [read-only] Indicates whether the media consists of a dynamic stream.
public function get isDynamicStream():Boolean| isLiveStream | property |
isLiveStream:Boolean [read-only] Specifies whether the current stream is live or not
public function get isLiveStream():Boolean| isPaused | property |
isPaused:Boolean [read-only] Returns true if the stream is paused and false if not.
public function get isPaused():Boolean| isPlaying | property |
isPlaying:Boolean [read-only] Indicates whether the media is currently playing.
public function get isPlaying():Boolean| isPlayingLive | property |
isPlayingLive:Boolean [read-only] Specifies whether the stream is within bounds (60s) of the live point.
public function get isPlayingLive():Boolean| isSeeking | property |
isSeeking:Boolean [read-only] Indicates whether the media is currently seeking.
public function get isSeeking():Boolean| isSwitching | property |
isSwitching:Boolean [read-only]
Indicates whether or not a dynamic stream switch is currently in progress.
This property will return true while a switch has been
requested and the switch has not yet been acknowledged and no switch failure
has occurred. Once the switch request has been acknowledged or a
failure occurs, the property will return false.
public function get isSwitching():Boolean| limitMaxSwitchingIndexToPlayerDimensions | property |
limitMaxSwitchingIndexToPlayerDimensions:BooleanCR 3087291 By setting the limitMaxSwitchingIndexToPlayerDimensions boolean to true, the player can limit the maximum allowed index to a video height that does not exceed the player dimensions. Rendering content of a higher resolution usually requires downsizing to fit to player dimensions. This can sometimes introduce artifacts when the content has a lot of text, for example. By limiting stream index dimensions to the embedded player height, downsizing can be avoided, if preferred. If there was a previous maxAllowedIndex setting, it will still apply as the max value for an index chosen through this setting. Value: Boolean Default: False
public function get limitMaxSwitchingIndexToPlayerDimensions():Boolean public function set limitMaxSwitchingIndexToPlayerDimensions(value:Boolean):void| loop | property |
loop:Boolean
Indicates whether the media should play again after playback has completed.
The loop property takes precedence over the autoRewind property,
so if loop is set to true, the autoRewind property
is ignored.
The default is false.
public function get loop():Boolean public function set loop(value:Boolean):void| manualSwitchMode | property |
manualSwitchMode:Boolean
Indicates whether or not the media will automatically switch between
dynamic streams. If in manual mode the switchTo
method can be used to manually switch to a specific stream.
The default is false.
public function get manualSwitchMode():Boolean public function set manualSwitchMode(value:Boolean):void| maxAllowedIndex | property |
maxAllowedIndex:intThe max allowed index in the current rendition set. Returns -1 if this property has not been set.
public function get maxAllowedIndex():int public function set maxAllowedIndex(value:int):voidSee also
| maxBestEffortDownloadAttemptsOnFragmentError | property |
maxBestEffortDownloadAttemptsOnFragmentError:NumberWhen fragment download fails due to IOError or data gap, the fragment retry logic kicks in. Following maximum unsuccessful retry attempts, if enableBestEffortDownloadOnFragmentError is set to true, HDCore will try to download the next valid forward fragment, with this value representing the number of such attempts. The default value is 10.
public function get maxBestEffortDownloadAttemptsOnFragmentError():Number public function set maxBestEffortDownloadAttemptsOnFragmentError(value:Number):void| maximumBitrateAllowed | property |
maximumBitrateAllowed:NumberWhen switching multi-bitrate content in auto switching mode, this property specifies the maximum stream bitrate in kbps the class is allowed to play. Even if the class finds a very high estimated bandwidth, it will only allow itself to play the highest rendition which is <= this value. If you set this property to a value lower than that currently playing, the class will switch down to satisfy this requirement. If you set it to a value that is lower than the lowest bitrate, it will still play that lowest bitrate.
A good use-case would be to limit the playback of a 3mbps rendition to fullscreen only. Let's imagine the next highest rendition is at 2mbps. So in normal playback mode, before calling the play() method, we could set maximumBitrateAllowed to 2500. This will force at most the 2mbps to stream to play in stage mode. As the user selects fullscreen, we could then set maximumBitrateAllowed to 3500. This would enable the class to switch up to the 3mbps rendition, assuming the user has bandwidth and is not dropping frames. As they exit fullscreen, we would again set maximumBitrateAllowed to 2500, which would force the class to switch down to the 2mbps stream. Note - this property is IGNORED in manual switching mode. It only applies and is enforced in auto-switching mode. public function get maximumBitrateAllowed():Number public function set maximumBitrateAllowed(value:Number):void| mediaHeight | property |
mediaHeight:Number [read-only] Intrinsic height of the media, in pixels. The intrinsic height is the height of the media before any processing has been applied. The default if no Display Object is present, is NaN.
public function get mediaHeight():Number| mediaWidth | property |
mediaWidth:Number [read-only] Intrinsic width of the media, in pixels. The intrinsic width is the width of the media before any processing has been applied. The default if no Display Object is present, is NaN.
public function get mediaWidth():Number| minimumBitrateAllowed | property |
minimumBitrateAllowed:NumberWhen switching multi-bitrate content in auto switching mode, this property specifies the minimum stream bitrate in kbps for the content. NOTE: If setting this value along with the maximumBitrateAllowed setting, insure that this value is less than the maximum bitrate value by at least one index. For example: max bitrate = 2000 min bitrate = 1500 Make sure that the bitrate range includes a playable index. This is a one time setting that will prune the media items from the manifest that have bitrates less than the corresponding minimum index. These will not be available thereafter in the currently loaded stream.
public function get minimumBitrateAllowed():Number public function set minimumBitrateAllowed(value:Number):void| muted | property |
muted:BooleanIndicates whether the media is currently muted.
If the media does not have audio then the muted state will be set to this value as soon as the media has audio.
public function get muted():Boolean public function set muted(value:Boolean):void| netSessionMode | property |
netSessionMode:StringSets the operation mode for NetSession (HDClient) interaction. The various modes are set via static string constants available in AkamaiNetSessionType.
NETSESSION_USAGE_OPPORTUNISTIC - defines the default netsession usage mode whereby the client will try to use NetSession if it is available. This mode will start the stream playing without using NetSession. Once the first buffer.full event is reached, a discovery request will be made to see if NetSession is installed. If it is, then all subsequent requests will be made through NetSession. If it isn't, then normal playback will continue. Selecting this mode while playback is underway will cause the client to immediately test for NetSession. If NetSession is available, then it will start using it. NETSESSION_USAGE_NEVER - defines the netsession usage mode whereby the client will never use NetSession. Selecting this mode before playback starts will cause all requests to be directed directly to the edge server. Selecting this mode while playback is underway will cause the client to immediately stop using NetSession if it is using peer-assisted delivery. An ArgumentError will be thrown if the argument does not match one of these values. public function get netSessionMode():String public function set netSessionMode(value:String):void| netStream | property |
netStream:NetStream [read-only] Returns the current instance of the NetStream class. Use AkamaiHDSEvent.NETSTREAM_READY event listen to when the netstream is ready.
public function get netStream():NetStream| numDynamicStreams | property |
numDynamicStreams:int [read-only] The total number of dynamic stream indices.
public function get numDynamicStreams():int| playerDimensions | property |
playerDimensions:ObjectCR 3087291 This property operates only when the limitMaxSwitchingIndexToPlayerDimensions property is set to true. Set the player dimensions on the controller as an object. The object should have two member variables, "width" representing the width of the embedded player and "height" representing the height of the embedded player. This API should ideally be used on every resize event. This insures the right target switching index is chosen if the limitMaxSwitchingIndexToPlayerDimensions property is set. Example: var dimensions:Object = new Object(); dimensions.width = playerWidth; dimensions.height = playerHeight; //For HDCore: streamController.playerDimensions = dimensions; For AASP: (netStream as AkamaiHTTPNetStream).hdsproperties.playerDimensions = dimensions;
public function get playerDimensions():Object public function set playerDimensions(value:Object):void| preloadDecryptionSWF | property |
preloadDecryptionSWF:BooleanSet this to true if you know you are playing encrypted media and would like to start playback as fast as possible. Setting to true will bypass the need to wait for encryption to be detected and will automaticlly download the decryption.swf at startup.
The default value is false.
public function get preloadDecryptionSWF():Boolean public function set preloadDecryptionSWF(value:Boolean):void| preventSwitchDownOnDroppedFrames | property |
preventSwitchDownOnDroppedFrames:BooleanJira HDCore-133 Jira HDCORE-128 If this property is set, the HDS DroppedFPSRule will not force an emergency switchdown in the requested fragments. Frame dropping is usually observed on switching between tabs. Setting this property on the stream controller will override a recommendation by the OSMF rules to switch down due to dropped frames.
public function get preventSwitchDownOnDroppedFrames():Boolean public function set preventSwitchDownOnDroppedFrames(value:Boolean):void| qualityOfExperience | property |
qualityOfExperience:Number [read-only] The quality of experience metric is a single number (with a range of 0-100) which attempts to sum up the quality of the playback experience. It updates constantly throughout a playback session. Much like your GPA was used to represent your ability at school, so the QoE metric attempts to characterize the playback expereince which the user is receiving. It takes bandwidth, switching, rebuffers and framedrops in to account.
This property is calculated by the Media Analytics component and will ONLY be available if you have set a value for the analyticsBeacon property. If this has not been set then qualityOfExperience will return NaN. public function get qualityOfExperience():NumberSee also
| resource | property |
resource:String [read-only] Returns a URL of the media file. String is only valid after the play method has been called.
public function get resource():String| resumeDVRAtLive | property |
resumeDVRAtLive:BooleanUsed to determine how a resume is handled after a "Limited DVR" stream is paused beyond the DVR Window. If this property is false (the default value), the stream would resume at the start of DVR Window. If this property is true, the stream would resume at live. (Similar to No DVR). This can be used in cases where Limited DVR with very small DVR Window is used and you want the user to resume at live after a pause.
public function get resumeDVRAtLive():Boolean public function set resumeDVRAtLive(value:Boolean):void| rollingEndOffset | property |
rollingEndOffset:Number [read-only] The rolling end offset, in seconds. This defines a rolling window of allowable play time behind the live point of a live stream.
public function get rollingEndOffset():Number| sbrBitrate | property |
sbrBitrate:Number [read-only] Returns the bitrate of the stream in case of single bitrate stream. The value is in kbps.
public function get sbrBitrate():Number| serverIP | property |
serverIP:String [read-only] Returns the server IP address once the stream is playing.
public function get serverIP():String| startingBitrate | property |
startingBitrate:NumberSets the max bitrate value you wish to use at startup in kbps. The index chosen will be the largest index whose total bitrate is smaller than or equal to this value. This property must be set before play() is called. Note that the bitrate value used is the sum of the video and audio, so if a rendition is labeled as "_700" its true bandwidth may be 786kbps. It's generally good practice then to specify a starting bitrate a N kbps or so higher than the bitrate you intend to target, where N is the max audio bitrate you are using. If you set both startingIndex and startingBitrate, startingIndex will be used. Set it to NaN to turn it off after setting it.
public function get startingBitrate():Number public function set startingBitrate(value:Number):void| startingIndex | property |
startingIndex:NumberThe starting index to use when playing multi-bitrate content. This index is zero-based.
public function get startingIndex():Number public function set startingIndex(value:Number):void| streamType | property |
streamType:String [read-only] Returns the type of the stream. This can be one of the AKAMAI_STREAM_TYPE_ in the AkamaiStreamType class
public function get streamType():StringSee also
| temporal | property |
temporal:Boolean [read-only] Indicates whether the media is temporal. Temporal media supports a duration and a currentTime within that duration.
public function get temporal():Boolean| time | property |
time:Number [read-only] Current time of the playhead in seconds.
public function get time():Number| timeAsUTC | property |
timeAsUTC:Number [read-only] Returns the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970. Note - this property only has meaning for live streams, or streams which were once live. For Akamai version 1 manifest the streambaseTime property must be >0 for this property to have meaning. A value of NaN will be returned if streambaseTime is 0.
public function get timeAsUTC():Number| totalAlternativeAudioIndices | property |
totalAlternativeAudioIndices:int [read-only]
Returns the total number of alternative audio streams or 0
if there are no alternative audio streams present.
public function get totalAlternativeAudioIndices():int| usingNetSession | property |
usingNetSession:Boolean [read-only] Returns true if the class is currently using NetSession to request fragments.
public function get usingNetSession():Boolean| vbrRatio | property |
vbrRatio:Number [read-only] Returns an estimate of the degree of VBR (variable bitrate encoding) encountered in the current content. For CBR encoded content, this value should be 1. For VBR content with a floor of 30% and peak of 500% (where 100% represents the target bitrate), then this value should range from 0.3 to 5.0.
Note this value is calculated from the last fragment downloaded. This is not the same as the fragment which is currently rendering. The two are separated by the current buffer length. Before the first fragment has loaded, property value will return NaN. public function get vbrRatio():Number| volume | property |
volume:NumberVolume of the media. Ranges from 0 (silent) to 1 (full volume).
public function get volume():Number public function set volume(value:Number):void| AkamaiStreamController | () | Constructor |
public function AkamaiStreamController()Constructor.
| analyticsSetData | () | method |
public function analyticsSetData(key:String, value:Object):void
Calls AnalyticsPluginLoader.setData with the
key/value pair provided to the method. You can call this
before or after calling the analyticsBeacon setter
property. See the "Media Analytics Plug-in Integration Guide
for Adobe Flash Players" for more information on the
AnalyticsPluginLoader.setData method.
Parameters
key:String | |
value:Object |
See also
| authenticate | () | method |
public function authenticate(username:String = null, password:String = null):voidAuthenticates the media. Can be used for both anonymous and credential-based authentication under Adobe Flash Access. Listen for the requiresUsernamePassword event to know if user/pass info is required for this content.
Parameters
username:String (default = null) — The username. Should be null for anonymous authentication.
| |
password:String (default = null) — The password. Should be null for anonymous authentication.
|
| authenticateWithToken | () | method |
public function authenticateWithToken(token:Object):void
Authenticates the media using an object which serves as a token. Can be used
for both anonymous and credential-based authentication with Adobe Flash Access.
Can be String or ByteArray. If a String is provided, the token will be
automatically created at the proper time and set on the drmService. You can call this anytime before play is called with a String.
If you are manually creating the token externally as an Object, you must not call this method until the event
AkamaiHDSEvent.DRM_AUTHENTICATING has been dispatched.
Parameters
token:Object — The token to use for authentication.
|
See also
| closeAndDestroy | () | method |
public function closeAndDestroy():void
Cleans up the class completely. A new instance of this class is required
after calling this method. You should set your instance to null immediately after
calling this method.
| convertToUTC | () | method |
public function convertToUTC(value:Number):NumberReturns the time in seconds since midnight UTC, Jan 1 1970, corresponding to the input number of relative seconds. The input should be a time value in seconds relative to the current start time and play duration boundaries (if any). This method is used to enable a scrub bar to show absolute time while being scrubbed. It should be used in conjunction with the timeAsUTC and durationAsUTC properties which give the playhead and max duration as UTC time respectively
Note - this property only has meaning for live streams, or streams which were once live.
Parameters
value:Number |
Number |
| getAlternativeAudioItemAt | () | method |
public function getAlternativeAudioItemAt(index:int):StreamingItem
Obtains the alternative audio stream corresponding to the specified
(0-based) index. Returns null if the index is -1.
Parameters
index:int |
StreamingItem |
RangeError — if the specified alternative audio stream index is less
than -1 or greater than the highest alternative audio
index available.
| |
IllegalOperationError — if the currently loaded media does not have
any associated alternative audio streams.
|
| getBitrateAtQualitylevel | () | method |
public function getBitrateAtQualitylevel(value:uint):NumberGets the associated bitrate, in kilobytes for the specified dynamic stream index.
Parameters
value:uint |
Number |
RangeError — If the specified dynamic stream index is less than zero or
greater than the highest dynamic stream index available.
| |
IllegalOperationError — If the media is not a dynamic stream.
|
| getStreamNameAtQualityLevel | () | method |
public function getStreamNameAtQualityLevel(value:uint):StringReturns the name of a stream at the index value supplied only after play has been called and only if is dynamic stream, Otherwise it returns null.
Parameters
value:uint — a uint indicating which index of the dynamic streaming item.
|
String —
|
| pause | () | method |
public function pause():voidPauses the media, if it is not already paused.
IllegalOperationError — if the media cannot be paused.
|
| play | () | method |
public function play(... args):void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
The play method initiates playback of a piece of media. Three arguments are supported:
AkamaiHDSEvent.NETSTREAM_READY event or the isPlaying property returns true.
Parameters
... args |
| requestAMDLongTokenForManifestURL | () | method |
public function requestAMDLongTokenForManifestURL(url:String):voidJira HDCORE-141 Set the requestAMDLongToken property to true if the HDS stream is of AMD VoD type and token authentication is activated in the SecureHD policy. AMD Live is currently not supported and may be supported in the future. Setting to true will create and make a request for the long token to be appended to future AMD fragment requests.
Parameters
url:String |
| resume | () | method |
public function resume():voidResumes the media from a paused state.
| seek | () | method |
public function seek(value:Number):voidInstructs the playhead to jump to the specified time.
If time is NaN or negative, does not attempt to seek.
Parameters
value:Number — Time to seek to in seconds.
|
IllegalOperationError — if the media cannot be seeked.
|
| stop | () | method |
public function stop():voidImmediately halts playback and returns the playhead to the beginning of the media file.
| switchAlternativeAudioIndex | () | method |
public function switchAlternativeAudioIndex(index:int):void
Changes the current audio stream to the alternative audio stream specified by a
0-based index value. Passing -1 as the index value resets the current
audio stream to the default audio stream.
Note that if media playback is paused, the audio stream switch does not occur
until after play resumes.
Parameters
index:int |
RangeError — if the specified alternative audio stream index is less than
-1 or greater than numAlternativeAudioStreams - 1.
| |
IllegalOperationError — if the currently loaded media does not have
any associated alternative audio streams.
|
| switchTo | () | method |
public function switchTo(value:int):void
Switch to a specific dynamic stream index. To switch up, use the currentIndex
property.
Parameters
value:int |
RangeError — If the specified dynamic stream index is less than zero or
greater than maxAllowedIndex.
| |
IllegalOperationError — If the media is not a dynamic stream, or if the dynamic
stream is not in manual switch mode.
|
See also
| timeCode | () | method |
public function timeCode(value:Number):StringA utility method which converts seconds into TimeCode.
Parameters
value:Number |
String |
| unloadMedia | () | method |
public function unloadMedia():void
Unloads the media completely, requiring a new call
to the play method.
| amdLongToken | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when the long token request for an AMD VoD stream returns with a valid response body.
| complete | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when a stream has played to completion.
| drmAuthenticating | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when a DRM protected stream requires a token to authenticate.
NOTE: there is a convenient way of authenticating a token protected Flash Access stream by using theauthenticateWithToken method. This method will
accept a token and handle authentication when required, no event listener is
necessary in this case.
See also
| error | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
Dispatched when an error which impacts the operation of media playback occurs.
The data object contains an org.osmf.events.MediaError object.
| hasAlternativeAudioChange | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
Dispatched when the hasAlternativeAudio property has changed.
See also
| httpStatus | Event |
com.akamai.net.f4f.hds.events.AkamaiHTTPStatusEventDispatched with the HTTP status code of each fragment before a complete/error. Contains following properties: - status : The HTTP status code - url : The URL of request
| isbuffering | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
Dispatched when the buffering state of the media changes. The data
object is a Boolean.
| islivestream | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched after the stream has been loaded and determined to be a live stream.
| isPlayingLive | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when the isPlayingLive property changes state.
| markerDurationReached | Event |
org.osmf.events.TimelineMetadataEventDispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the duration offset of one of the TimelineMarkers in this TimelineMetadata.
| markerTimeReached | Event |
org.osmf.events.TimelineMetadataEventDispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the time value of one of the TimelineMarkers in this TimelineMetadata.
| netStreamReady | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when the netStream property is ready for use (meaning it will return a non-null object). There is no payload with this event, it is simply a notifier event.
| progress | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched during the life of the stream with an interval of 100ms. Like a heart-beat indicating the stream is active.
| requiresUsernamePassword | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEventDispatched when a DRM protected stream requires a username and password to authenticate.
private function onRequiresPassword(event:Event):void
{
// Since the stream get's re-loaded after authentication, you will need to listen
// for the AkamaiHDSEvent.NETSTREAM_READY event and re-attach the
// NetStream object to the video object.
streamController.addEventListener(AkamaiHDSEvent.NETSTREAM_READY, onNetStreamReady);
// ... Prompt the user for username and password ...
getUsernamePassword();
// Authenticate
streamController.authenticate(userInput.text, passwordInput.text);
}
See also
| streamlength | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
Dispatched when stream duration has been determined. The data
property will be the stream length.
| switchComplete | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
For dynamic streaming, indicates the switch is complete and is visible to the user.
The data object for the event will contain:
| switchRequested | Event |
com.akamai.net.f4f.hds.events.AkamaiHDSEvent
For dynamic streaming, dispatched when either a manual switch has been requested or a
switching rule has requested a switch to a new index.
The data object for the event will contain these items:
package
{
import com.akamai.net.f4f.hds.AkamaiStreamController;
import com.akamai.net.f4f.hds.events.AkamaiHDSEvent;
import flash.display.Sprite;
import flash.media.Video;
public class AkamaiStreamControllerExample extends Sprite
{
private var MEDIA:String = "http://multiplatform-f.akamaihd.net/z/multi/april11/hdworld/hdworld_,512x288_450_b,640x360_700_b,768x432_1000_b,1024x576_1400_m,1280x720_1900_m,1280x720_2500_m,1280x720_3500_m,.mp4.csmil/manifest.f4m";
private var streamController:AkamaiStreamController;
public function AkamaiStreamControllerExample()
{
streamController = new AkamaiStreamController();
streamController.addEventListener(AkamaiHDSEvent.NETSTREAM_READY, onNetStreamReady);
streamController.play(MEDIA);
}
private function onNetStreamReady(event:AkamaiHDSEvent):void
{
var video:Video = new Video(320, 180);
video.attachNetStream(streamController.netStream);
addChild(video);
}
}
}