new NetworkStatistics()
Methods
-
addNetworkListener(networkStatisticsListener)
-
Add a listener for network statistics events to listener list
Name Type Description networkStatisticsListenerObject Name Type Description availableBitratesChangedcallback fired on possible change of available bitrates
selectedBitrateChangedcallback fired on change of selected bitrate
urlChangedcallback fired on each different file downloaded
errorChangedcallback fired on HTTP error
httpProcessingEndedcallback fired on file downloaded passing the following download information { startTime, endTime, duration, url, mimeType }
-
getAdaptiveStreaming(){NetworkStatistics~adaptiveStreamingObject}
-
Provides information on the available bitrates, and the bitrate selected for download
Returns:
Type Description NetworkStatistics~adaptiveStreamingObject -
getContentServer(){NetworkStatistics~contentServerObject}
-
Provides information about the content server
Returns:
Type Description NetworkStatistics~contentServerObject -
getNetworkUsage(){NetworkStatistics~networkUsageObject}
-
Provides information about the amount and rates of downloads
Returns:
Type Description NetworkStatistics~networkUsageObject -
removeNetworkListener(networkStatisticsListener)
-
Remove the listener for network statistics events from listener list
Name Type Description networkStatisticsListenerObject Reference to a listener function that was added previously
-
setNetworkListener(networkStatisticsListener)
-
Sets listeners for network statistics events
Name Type Description networkStatisticsListenerObject Name Type Description availableBitratesChangedcallback fired on possible change of available bitrates
selectedBitrateChangedcallback fired on change of selected bitrate
urlChangedcallback fired on each different file downloaded
errorChangedcallback fired on HTTP error
httpProcessingEndedcallback fired on file downloaded passing the following download information { startTime, endTime, duration, url, mimeType }
Type Definitions
-
adaptiveStreamingObjectObject
-
An object which defines the adaptiveStreaming statistics
Properties:
Name Type Description selectedBitratenumber bitrate currently selected for download
availableBitratesArray.<number> the bitrates available for download
-
contentServerObjectObject
-
An object describing the content server
Properties:
Name Type Description urlstring Provides the URL of the downloaded file. The exact file (manifest or fragment) will depend on the type of content.
-
networkUsageObject
-
An object which defines the NetworkUsage statistics
Properties:
Name Type Description bytesDownloadednumber total bytes downloaded (video + audio)
downloadBitratenumber bits/s for last video segment downloaded
downloadBitrateAveragenumber bits/s averaged over the last 5 video segments