Inizio capitolo

L’evento di inizio capitolo segnala l’inizio di un capitolo all’interno del contenuto. Il tracciamento dei capitoli è facoltativo e non obbligatorio per il tracciamento dei contenuti multimediali di base. I capitoli non possono sovrapporsi; invia Capitolo completato o Capitolo ignorato per chiudere il capitolo corrente prima di avviarne uno nuovo.

Web SDK

Chiama sendEvent con eventType: "media.chapterStart" e il chapterDetails richiesto:

alloy("sendEvent", {
  xdm: {
    eventType: "media.chapterStart",
    mediaCollection: {
      chapterDetails: {
        friendlyName: "Pilot Episode - Opening",
        index: 1,
        offset: 0,
        length: 240
      },
      sessionID: "{sid}",
      playhead: 0
    }
  }
});

Mobile SDK

Passa il nome del capitolo, la posizione, la lunghezza e l’ora di inizio a createChapterObject, quindi chiama trackEvent.

iOS (Swift)

let chapterObject = Media.createChapterObjectWith(name: "Pilot Episode - Opening",
                                              position: 1,
                                                length: 240,
                                             startTime: 0)

tracker.trackEvent(event: MediaEvent.ChapterStart, info: chapterObject, metadata: nil)

Android (Cotlino)

val chapterObject = Media.createChapterObject("Pilot Episode - Opening",
                                              1,
                                              240,
                                              0)

tracker.trackEvent(Media.Event.ChapterStart, chapterObject, null)

Roku (BrightScript)

Chiama sendMediaEvent con eventType: "media.chapterStart" e il chapterDetails richiesto:

m.aepSdk.sendMediaEvent({
    "xdm": {
        "eventType": "media.chapterStart",
        "mediaCollection": {
            "chapterDetails": {
                "friendlyName": "Pilot Episode - Opening",
                "index": 1,
                "offset": 0,
                "length": 240
            },
            "playhead": 0
        }
    }
})

API di Media Edge

Chiama l’endpoint chapterStart con chapterDetails richiesto:

curl -X POST "https://edge.adobedc.net/ee/va/v1/chapterStart?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
  "events": [{
    "xdm": {
      "eventType": "media.chapterStart",
      "mediaCollection": {
        "sessionID": "{sid}",
        "playhead": 0,
        "chapterDetails": {
          "index": 1,
          "length": 240,
          "offset": 0
        }
      },
      "timestamp": "YYYY-08-20T22:41:40+00:00"
    }
  }]
}'

Media SDK

Passa il nome del capitolo, la posizione, la lunghezza e l’ora di inizio a ADB.Media.createChapterObject:

var chapterInfo = ADB.Media.createChapterObject(
  "Pilot Episode - Opening",  // name
  1,                          // position
  240,                        // length (seconds)
  0                           // start time (seconds)
);

tracker.trackEvent(ADB.Media.Event.ChapterStart, chapterInfo, null);

API Media Collection

Invia un POST chapterStart all’endpoint eventi:

{
  "playerTime": { "playhead": 0, "ts": 1699523820000 },
  "eventType": "chapterStart",
  "params": {
    "media.chapter.friendlyName": "Pilot Episode - Opening",
    "media.chapter.index": 1,
    "media.chapter.offset": 0,
    "media.chapter.length": 240
  }
}
recommendation-more-help
media-analytics-help