从 API 1.x 转换到 2.x

Media SDK 2.x API 引用

必需跟踪* API:

VHL 1.x VHL 2.x
videoPlayerPlugin.trackVideoLoad() 不适用
videoPlayerPlugin.trackSessionStart() mediaHeartbeat.trackSessionStart(mediaObject, mediaCustomMetadata)
videoPlayerPlugin.trackPlay() mediaHeartbeat.trackPlay()
videoPlayerPlugin.trackPause() mediaHeartbeat.trackPause()
videoPlayerPlugin.trackComplete() mediaHeartbeat.trackComplete()
videoPlayerPlugin.trackVideoUnload() mediaHeartbeat.trackSessionEnd()
videoPlayerPlugin.trackApplicationError() 不适用
videoPlayerPlugin.trackVideoPlayerError() mediaHeartbeat.trackError()

现在,所有的可选跟踪 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)

在此页面上

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