PlayerBandwidthMeter
Provides an implementation of BandwidthMeter that tracks the total number of bytes transferred. By default all work will be delegated to DefaultBandwidthMeter. The caller may override the delegate to another instance any time.
Author
rsubramaniam
Constructors
Link copied to clipboard
constructor()
Constructs a new instance of the bandwidth meter that will use DefaultBandwidthMeter internally to delegate the work.
constructor(eventHandler: Handler, eventListener: EventListener)
Constructs a new instance of the bandwidth meter that will use DefaultBandwidthMeter internally to delegate the work.
constructor(context: Context, eventHandler: Handler, eventListener: EventListener)
Constructs a new instance of the bandwidth meter that will use DefaultBandwidthMeter internally to delegate the work.
constructor(bandwidthMeter: BandwidthMeter)
Constructs a new instance of the bandwidth meter that will use given bandwidth meter to delegate the work.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Gets reference to actual bandwidth meter that is currently being delegated to handle bitrate estimate calculations.
Link copied to clipboard
Gets the total number of bytes transferred so far.
Link copied to clipboard
Link copied to clipboard
open fun onBytesTransferred(source: DataSource, dataSpec: DataSpec, isNetwork: Boolean, bytesTransferred: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Resets the counter for total number of bytes transferred.
Link copied to clipboard
Sets reference to actual bandwidth meter that must be used to handle bitrate estimate calculations.