Bitrate change

The bitrate change event signals that the player negotiated a new playback bitrate. Send it whenever the bitrate changes during playback. Include the new bitrate value in the QoE data so the backend can compute Average bitrate and the per-bitrate-bucket dimension.

Web SDK

Call sendEvent with eventType: "media.bitrateChange" and the new bitrate in qoeDataDetails:

alloy("sendEvent", {
  xdm: {
    eventType: "media.bitrateChange",
    mediaCollection: {
      qoeDataDetails: {
        bitrate: 3200,
        droppedFrames: 0,
        framesPerSecond: 24,
        timeToStart: 0
      },
      sessionID: "{sid}",
      playhead: 90
    }
  }
});

Mobile SDK

Create a QoE object with the new bitrate and update the tracker before the bitrate change event fires.

iOS (Swift)

let qoeObject = Media.createQoEObjectWith(bitrate: 3200,
                                       startupTime: 0,
                                               fps: 24,
                                     droppedFrames: 0)

tracker.updateQoEObject(qoe: qoeObject)
tracker.trackEvent(event: MediaEvent.BitrateChange, info: nil, metadata: nil)

Android (Kotlin)

val qoeObject = Media.createQoEObject(3200, 0, 24, 0)

tracker.updateQoEObject(qoeObject)
tracker.trackEvent(Media.Event.BitrateChange, null, null)

Roku (BrightScript)

Call sendMediaEvent with eventType: "media.bitrateChange" and the new bitrate in qoeDataDetails:

m.aepSdk.sendMediaEvent({
    "xdm": {
        "eventType": "media.bitrateChange",
        "mediaCollection": {
            "qoeDataDetails": {
                "bitrate": 3200,
                "droppedFrames": 0,
                "framesPerSecond": 24,
                "timeToStart": 0
            },
            "playhead": 90
        }
    }
})

Media Edge API

Call the bitrateChange endpoint with the new bitrate in qoeDataDetails:

curl -X POST "https://edge.adobedc.net/ee/va/v1/bitrateChange?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
  "events": [{
    "xdm": {
      "eventType": "media.bitrateChange",
      "mediaCollection": {
        "qoeDataDetails": {
          "bitrate": 3200
        },
        "sessionID": "{sid}",
        "playhead": 90
      },
      "timestamp": "YYYY-08-20T22:41:40+00:00"
    }
  }]
}'

Media SDK

Create a QoE object with the new bitrate and update the tracker:

var qoeObject = ADB.Media.createQoEObject(
  3200,  // bitrate (kbps)
  0,     // startup time (ms)
  24,    // fps
  0      // dropped frames
);

tracker.updateQoEObject(qoeObject);
tracker.trackEvent(ADB.Media.Event.BitrateChange);

Media Collection API

Send a bitrateChange POST to the events endpoint with the new bitrate in qoeData:

{
  "playerTime": { "playhead": 90, "ts": 1699523820000 },
  "eventType": "bitrateChange",
  "qoeData": {
    "media.qoe.bitrate": 3200
  }
}
recommendation-more-help
media-analytics-help