Show Menu
TOPICS×

Implementação de metadados padrão usando o JavaScript 3.x

Implementação

Instancie um objeto de dados de contexto e preencha as variáveis de metadados padronizadas desejadas. Por exemplo:
_onVideoLoad = function () { //Create the Media Object var mediaObject = ADB.Media.createMediaObject(<MEDIA_NAME>, <MEDIA_ID, <MEDIA_LENGTH>, <STREAM_TYPE>, <MEDIA_TYPE>); //Set standard Video Metadata var contextData = {}; contextData[MediaHeartbeat.VideoMetadataKeys.SHOW] = "Sample Show"; contextData[MediaHeartbeat.VideoMetadataKeys.SEASON] = "Sample Season"; contextData[MediaHeartbeat.VideoMetadataKeys.EPISODE] = "Sample Episode"; //Set standard Audio Metadata var contextData = {}; contextData[MediaHeartbeat.AudioMetadataKeys.ARTIST] = "Sample Artist"; contextData[MediaHeartbeat.AudioMetadataKeys.ALBUM] = "Sample Album"; contextData[MediaHeartbeat.AudioMetadataKeys.LABEL] = "Sample Label"; this._mediaHeartbeat.trackSessionStart(mediaObject, contextData); };