API 1.x to 2.x conversion

Media SDK 2.x API References

Required Track* APIs:

 VHL 1.x  VHL 2.x
videoPlayerPlugin.trackVideoLoad() N/A
videoPlayerPlugin.trackSessionStart() mediaHeartbeat.trackSessionStart(mediaObject, mediaCustomMetadata)
videoPlayerPlugin.trackPlay() mediaHeartbeat.trackPlay()
videoPlayerPlugin.trackPause() mediaHeartbeat.trackPause()
videoPlayerPlugin.trackComplete() mediaHeartbeat.trackComplete()
videoPlayerPlugin.trackVideoUnload() mediaHeartbeat.trackSessionEnd()
videoPlayerPlugin.trackApplicationError() N/A
videoPlayerPlugin.trackVideoPlayerError() mediaHeartbeat.trackError()

All of the optional tracking APIs such as (Ads, Chapters, Bitrate change, Seeking, and Buffering) are now part of a single trackEvent API. The trackEvent API receives a constant parameter that represents the type of event that it is intended to track:

Optional trackEvent APIs:

VHL 1.x VHL 2.x
Return a valid AdBreakInfo in VideoPlayerPlugin.getAdBreakInfo() trackEvent(Event.AdBreakStart)
Return null in VideoPlayerPlugin.getAdBreakInfo() trackEvent(Event.AdBreakComplete)
playerPlugin.trackAdStart() trackEvent(Event.AdStart, adObject, adCustomMetadata)
playerPlugin.trackAdComplete() trackEvent(Event.AdComplete)
Return null in VideoPlayerPlugin.getAdInfo() trackEvent(Event.AdSkip)
playerPlugin.trackChapterStart() trackEvent(Event.ChapterStart, chapterObject, chapterCustomMetadata)
playerPlugin.trackChapterComplete() trackEvent(Event.ChapterComplete)
Return null in VideoPlayerPlugin.getChapterInfo() trackEvent(Event.ChapterSkip)
playerPlugin.trackSeekStart() trackEvent(Event.SeekStart)
playerPlugin.trackSeekComplete() trackEvent(Event.SeekComplete)
playerPlugin.trackBufferStart() trackEvent(Event.BufferStart)
playerPlugin.trackBufferComplete() trackEvent(Event.BufferComplete)
playerPlugin.trackBitrateChange() trackEvent(Event.BitrateChange)
playerPlugin.trackTimedMetadata() trackEvent(Event.TimedMetadataUpdate)

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free