Show Menu
主题×

从 API 1.x 转换到 2.x

必需跟踪* API:

 VHL 1.x 
VHL 2.x
videoPlayerPlugin.trackVideoLoad()
不适用
videoPlayerPlugin.trackSessionStart()
videoPlayerPlugin.trackPlay()
videoPlayerPlugin.trackPause()
videoPlayerPlugin.trackComplete()
videoPlayerPlugin.trackVideoUnload()
videoPlayerPlugin.trackApplicationError()
不适用
videoPlayerPlugin.trackVideoPlayerError()
现在,所有的可选跟踪 API(例如,广告、章节、比特率更改、搜寻和缓冲)都纳入到单个 trackEvent API 中。 trackEvent API 接收代表要跟踪的事件类型的常量参数:

可选 trackEvent API:

VHL 1.x
VHL 2.x
VideoPlayerPlugin.getAdBreakInfo() 中返回有效的 AdBreakInfo
trackEvent(Event.AdBreakStart)
VideoPlayerPlugin.getAdBreakInfo() 中返回空值
trackEvent(Event.AdBreakComplete)
playerPlugin.trackAdStart()
trackEvent(Event.AdStart, adObject, adCustomMetadata)
playerPlugin.trackAdComplete()
trackEvent(Event.AdComplete)
VideoPlayerPlugin.getAdInfo() 中返回空值
trackEvent(Event.AdSkip)
playerPlugin.trackChapterStart()
trackEvent(Event.ChapterStart, chapterObject, chapterCustomMetadata)
playerPlugin.trackChapterComplete()
trackEvent(Event.ChapterComplete)
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)