Time to start

This page covers data collection for the Time to start variable. See Time to start for the corresponding reporting dimension and metric.

The time to start variable is the elapsed time, in milliseconds, between the player initiating playback and the first frame rendering. Set it on the QoE object before the session start event fires. Adobe stores and reports the value in seconds; pass milliseconds and Adobe converts at ingest.

IMPORTANT
Once the player begins rendering content frames, stop updating timeToStart. The value can increase during the initial buffering or load phase, but should be treated as fixed from the moment playback begins. Continuing to update it after the first frame renders produces an inflated or incorrect Time to start metric.
Property
Value
Context data variable
a.media.qoe.timeToStart
XDM collection field
xdm.mediaCollection.qoeDataDetails.timeToStart
Audience Manager trait
c_contextdata.a.media.qoe.timeToStart
Required
No
Sent with
Session start, session close
Web SDK

Set timeToStart inside xdm.mediaCollection.qoeDataDetails on media.sessionStart when calling sendEvent:

code language-javascript
alloy("sendEvent", {
  xdm: {
    eventType: "media.sessionStart",
    mediaCollection: {
      sessionDetails: {
        name: "video-123",
        length: 128,
        contentType: "vod",
        playerName: "HTML5 Player",
        channel: "Sports",
        streamType: "video"
      },
      qoeDataDetails: {
        timeToStart: 30000
      },
      playhead: 0
    }
  }
});
iOS

Pass startup time as the second argument (startupTime) to createQoEObject.

code language-swift
let qoeObject = Media.createQoEObjectWith(bitrate: 3200,
                                       startupTime: 30000,
                                               fps: 24,
                                     droppedFrames: 0)

tracker.updateQoEObject(qoe: qoeObject)
Android

Pass startup time as the second argument (startupTime) to createQoEObject.

code language-kotlin
val qoeObject = Media.createQoEObject(3200L,
                                      30000.0,
                                      24.0,
                                      0L)

tracker.updateQoEObject(qoeObject)
Roku Edge

Set timeToStart inside xdm.mediaCollection.qoeDataDetails on media.sessionStart when calling createMediaSession:

code language-brightscript
m.aepSdk.createMediaSession({
    "xdm": {
        "eventType": "media.sessionStart",
        "mediaCollection": {
            "sessionDetails": {
                "name": "video-123",
                "length": 128,
                "contentType": "vod",
                "playerName": "Roku Player",
                "channel": "Sports",
                "streamType": "video"
            },
            "qoeDataDetails": {
                "timeToStart": 30000
            },
            "playhead": 0
        }
    }
})
Media Edge API

Call the sessionStart endpoint with timeToStart inside xdm.mediaCollection.qoeDataDetails:

code language-json
{
  "events": [{
    "xdm": {
      "eventType": "media.sessionStart",
      "mediaCollection": {
        "sessionDetails": {
          "name": "video-123",
          "length": 128,
          "contentType": "vod",
          "playerName": "HTML5 Player",
          "channel": "Sports"
        },
        "qoeDataDetails": {
          "timeToStart": 30000
        },
        "playhead": 0
      }
    }
  }]
}

Legacy implementation types (Analytics-only)

Media SDK JS 3.x

Pass time to start as the second argument to ADB.Media.createQoEObject:

code language-javascript
var qoeObject = ADB.Media.createQoEObject(3200, 30000, 24, 0);
tracker.updateQoEObject(qoeObject);
Chromecast

Pass startup time in milliseconds as the second argument (startupTime) to ADBMobile.media.createQoSObject and update the tracker:

code language-javascript
var qosInfo = ADBMobile.media.createQoSObject(
  3200,   // bitrate
  0,      // startupTime (ms)
  24,     // fps
  0       // droppedFrames
);
ADBMobile.media.updateQoSObject(qosInfo);
Roku 2.x

Pass the startup time as the second argument (startupTime) to adb_media_init_qosinfo and update the tracker with mediaUpdateQoS:

code language-brightscript
adb = ADBMobile()
qosInfo = adb_media_init_qosinfo(3200.0, 0.0, 24.0, 0.0)  ' bitrate, startupTime, fps, droppedFrames

adb.mediaUpdateQoS(qosInfo)
Media Collection API

Include media.qoe.timeToStart in the params object on sessionStart:

code language-json
{
  "playerTime": { "playhead": 0, "ts": 1699523820000 },
  "eventType": "sessionStart",
  "params": {
    "media.qoe.timeToStart": 30000
  }
}

See the Media Collection API sessions reference for the full request structure.

recommendation-more-help
media-analytics-help