Show Menu
TOPICS×

API 1.x to 2.x conversion

Required Track* APIs:

 VHL 1.x 
VHL 2.x
videoPlayerPlugin.trackVideoLoad()
N/A
videoPlayerPlugin.trackSessionStart()
videoPlayerPlugin.trackPlay()
videoPlayerPlugin.trackPause()
videoPlayerPlugin.trackComplete()
videoPlayerPlugin.trackVideoUnload()
videoPlayerPlugin.trackApplicationError()
N/A
videoPlayerPlugin.trackVideoPlayerError()
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)