VOD-Wiedergabe mit Suche im Hauptinhalt

Szenario

Dieses Szenario beinhaltet die Suche im Hauptinhalt während der Wiedergabe.

Dieses Szenario ist mit dem Szenario VOD-Wiedergabe ohne Anzeigen identisch, allerdings wird hierbei ein Teil des Inhalts durchsucht und die Suche wird von einem Punkt im Hauptinhalt bis zu einem anderen Punkt durchgeführt.

Auslöser Heartbeat-Methode Netzwerkaufrufe Hinweise
Anwender klickt auf Abspielen trackSessionStart Analytics Content Start, Heartbeat Content Start Der Measurement Library ist nicht bekannt, dass es eine Pre-Roll-Anzeige gibt. Daher sind diese Netzwerkaufrufe mit dem Szenario VOD-Wiedergabe ohne Anzeigen identisch.
Das erste Bild des Inhalts wird wiedergegeben. trackPlay Heartbeat Content Play Wenn Kapitelinhalte vor dem Hauptinhalt wiedergegeben werden, starten Heartbeats beim Beginn des Kapitels.
Inhalt wird wiedergegeben Content Heartbeats Dieser Netzwerkaufruf ist mit dem Aufruf beim Szenario VOD-Wiedergabe ohne Anzeigen identisch.
Benutzer beginnt Suchvorgang im Inhalt trackSeekStart Bis zum Abschluss der Suche (z. B. trackSeekComplete) werden keine Heartbeats gesendet.
Suchvorgang abgeschlossen trackSeekComplete Heartbeats werden wieder gesendet, da die Suche abgeschlossen ist. Tipp: Der Wert der Abspielleiste sollte die richtige neue Abspielposition nach der Suche widerspiegeln.
Inhalt ist abgeschlossen. trackComplete Heartbeat Content Complete Dieser Netzwerkaufruf ist mit dem Aufruf beim Szenario VOD-Wiedergabe ohne Anzeigen identisch.
Sitzung beendet trackSessionEnd SessionEnd

Beispielcode

In diesem Szenario führt der Anwender eine Suche aus, während der Hauptinhalt abgespielt wird.

Android

Um dieses Szenario in Android anzuzeigen, verwenden Sie folgenden Code:

// Set up mediaObject
MediaObject mediaInfo = MediaHeartbeat.createMediaObject(
  Configuration.MEDIA_NAME,
  Configuration.MEDIA_ID,
  Configuration.MEDIA_LENGTH,
  MediaHeartbeat.StreamType.VOD
);

HashMap<String, String> mediaMetadata = new HashMap<String, String>();
mediaMetadata.put(CUSTOM_KEY_1, CUSTOM_VAL_1);
mediaMetadata.put(CUSTOM_KEY_2, CUSTOM_VAL_2);

// 1. Call trackSessionStart() when the user clicks Play or if autoplay is used,
//    i.e., there is an intent to start playback.
_mediaHeartbeat.trackSessionStart(mediaInfo, mediaMetadata);

......
......

// 2. Call trackPlay() when the playback actually starts, i.e., whn the first frame
//    of the main content is rendered on the screen.
_mediaHeartbeat.trackPlay();

.......
.......

// 3. Track the MediaHeartbeat.Event.SeekStart event when the user begins to seek.
_mediaHeartbeat.trackEvent(MediaHeartbeat.Event.SeekStart, null, null);

.......
.......

// 4. Track the MediaHeartbeat.Event.SeekComplete event when the user completes seeking
_mediaHeartbeat.trackEvent(MediaHeartbeat.Event.SeekComplete, null, null);

.......
.......

// 5. Call trackComplete() when the playback reaches the end, i.e., when the media
//    completes and finishes playing.
_mediaHeartbeat.trackComplete();

........
........

// 6. Call trackSessionEnd() when the playback session is over. This method must be
//    called even if the user does not watch the media to completion.
_mediaHeartbeat.trackSessionEnd();

........
........

iOS

Um dieses Szenario in iOS anzuzeigen, verwenden Sie folgenden Code:

// Set up mediaObject
ADBMediaObject *mediaObject =
[ADBMediaHeartbeat createMediaObjectWithName:MEDIA_NAME o
                   length:MEDIA_LENGTH
                   streamType:ADBMediaHeartbeatStreamTypeVOD];

NSMutableDictionary *mediaContextData = [[NSMutableDictionary alloc] init];
[mediaContextData setObject:CUSTOM_VAL_1 forKey:CUSTOM_KEY_1];
[mediaContextData setObject:CUSTOM_VAL_2 forKey:CUSTOM_KEY_2];

// 1. Call trackSessionStart when the user clicks Play or if autoplay is used,
//    i.e., there is an intent to start playback.
[_mediaHeartbeat trackSessionStart:mediaObject data:mediaContextData];
.......
.......

// 2. Call trackPlay when the playback actually starts, i.e., when the
//    first frame of the main content is rendered on the screen.
[_mediaHeartbeat trackPlay];
.......
.......

// 3. Track the trackEvent:ADBMediaHeartbeatEventSeekStart event when the user
//    begins to seek out of the chapter with the intent to skip it.
[_mediaHeartbeat trackEvent:ADBMediaHeartbeatEventSeekStart
               mediaObject:nil
               data:nil];
.......
.......

// 4. Track the trackEvent:ADBMediaHeartbeatEventSeekComplete event when the
//    user seeks out of the chapter with the intent to skip it.
[_mediaHeartbeat trackEvent:ADBMediaHeartbeatEventSeekComplete
               mediaObject:nil
               data:nil];
.......
.......

// 5. Call trackComplete when the playback reaches the end, i.e., completes
//    and finishes playing.
[_mediaHeartbeat trackComplete];
.......
.......

// 6. Call trackSessionEnd when the playback session is over. This method must
//    be called even if the user does not watch the media to completion.
[_mediaHeartbeat trackSessionEnd];
.......
.......

JavaScript

Geben Sie den folgenden Text ein, um dieses Szenario anzuzeigen:

// Set up mediaObject
var mediaInfo = MediaHeartbeat.createMediaObject(
  Configuration.MEDIA_NAME,
  Configuration.MEDIA_ID,
  Configuration.MEDIA_LENGTH,
  MediaHeartbeat.StreamType.VOD

);

var mediaMetadata = {
  CUSTOM_KEY_1 : CUSTOM_VAL_1,
  CUSTOM_KEY_2 : CUSTOM_VAL_2,
  CUSTOM_KEY_3 : CUSTOM_VAL_3

};

// 1. Call trackSessionStart() when Play is clicked or if autoplay is used,
//    i.e., there's an intent to start playback.
this._mediaHeartbeat.trackSessionStart(mediaInfo, mediaMetadata);

......
......

// 2. Call trackPlay() when the playback actually starts, i.e., when the
//    first frame of the ad media is rendered on the screen.
this._mediaHeartbeat.trackPlay();

.......
.......

// 3. Track the MediaHeartbeat.Event.SeekStart event when the user
//    begins to seek.
this._mediaHeartbeat.trackEvent(MediaHeartbeat.Event.SeekStart);

.......
.......

// 4. Track the MediaHeartbeat.Event.SeekComplete event when the user
//    completes seeking.
this._mediaHeartbeat.trackEvent(MediaHeartbeat.Event.SeekComplete);

.......
.......

// 5. Call trackComplete() when the playback reaches the end, i.e., when
//    playback completes and finishes playing.
this._mediaHeartbeat.trackComplete();

........
........

// 6. Call trackSessionEnd() when the playback session is over. This method must be called
//    even if the user does not watch the media to completion.
this._mediaHeartbeat.trackSessionEnd();

........
........

Auf dieser Seite