This page covers how to implement bitrate-change events. See Bitrate changes (dimension) and Bitrate changes (metric) for the corresponding reporting variables.
The bitrate change event signals that the player has switched to a different bitrate. Update the Bitrate value on the QoE object first, then fire the bitrate change event. The backend uses the count of these events to compute the Bitrate changes dimension and Bitrate changes metric, and the resulting bitrate values feed Average bitrate.
media.bitrateChangec_contextdata.a.media.qoe.bitrateChangeCountRecommended implementation types
Use sendEvent to send a media.bitrateChange event with the new bitrate:
| code language-javascript |
|---|
|
Update the QoE object with the new bitrate, then fire the bitrate change event.
| code language-swift |
|---|
|
Update the QoE object with the new bitrate, then fire the bitrate change event.
| code language-kotlin |
|---|
|
Use sendMediaEvent with media.bitrateChange to signal a bitrate change. Include the new bitrate in qoeDataDetails:
| code language-brightscript |
|---|
|
Call the bitrateChange endpoint with the updated qoeDataDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Update the QoE object and fire the event:
| code language-javascript |
|---|
|
Update the QoS object with the new bitrate, then fire the bitrate change event:
| code language-javascript |
|---|
|
Send a bitrateChange POST request with the new bitrate:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.