Track quality of experience on Chromecast
Quality of experience tracking includes quality of service (QoS) and error tracking, both are optional elements and are
notrequired for core media tracking implementations. You can use the media player API to identify the variables related to QoS and error tracking.
On all bitrate change events
- Create/update the QoS object instance for the playback,qosObject
- CalltrackEvent(Media.Heartbeat.Event.BitrateChange, qosObject);
On player errors
trackError(“media error id”);
- Identify when the bitrate changes during media playback and create theMediaObjectinstance using the QoS information.QoSObject variables:These variables are only required if you are planning to track QoS.VariableDescriptionRequiredbitrateCurrent bitrateYesstartupTimeStartup timeYesfpsFPS valueYesdroppedFramesNumber of dropped framesYesQoS object creation:createQoSObjectqosInfo = ADBMobile.media.createQoSObject(50000, 0, 24, 10);
- When playback switches bitrates, call theBitrateChangeevent in the Media Heartbeat instance: trackEventADBMobile.media.trackEvent(ADBMobile.media.Event.BitrateChange);Update the QoS object and call the bitrate change event on every bitrate change. This provides the most accurate QoS data.
- Make sure thatgetQoSObject()method returns the most updated QoS information.
- When the media player encounters an error, and the error event is available to the player API, usetrackError()to capture the error information. (See Overview .)Tracking media player errors will not stop the media tracking session. If the media player error prevents the playback from continuing, make sure that the media tracking session is closed by callingtrackSessionEnd()after callingtrackError().