You can set up your player to read playback and device statistics from the QoSProvider as often as needed.
QoSProvider class provides various statistics, including the frame rate, the profile bit rate, the total time spent in buffering, the number of buffering attempts, the time it took to get the first byte from the first video fragment, the time it took to render the first frame, the currently buffered length, and the buffer time.
The reference implementation provides a
QoSManager class where you can enable the display of the QoS overlay. You can also enable the QoS visibility in the Settings user interface:
QoSManager tracks QoS statistics by getting device information, attaching to the media player, and updating with the latest QoS information.
Enable or disable QoS statistics reporting
Create a QosManager or enable QoS reporting using the ManagerFactory.
QoSManager qosManager = new QosManagerOn();
qosManager = ManagerFactory.getQosManager(
true, config, mediaPlayer);
Changing the boolean to
false disables QoS reporting.
Add event listeners:
Create the QoS provider and attach it to the player activity context:
When the player activity is going to be destroyed, make sure to call qosManager.destroyQOSProvider to clean up the QOS provider by detaching it from the media player.
Related API documentation