Show Menu
TOPICS×

Chromecast metadata keys

Standard video and ad metadata can be set on media and ad info objects respectively. Using the constants keys for video/ad metadata set the dictionary containing standard metadata on info object before calling the track APIs. Refer the tables below for the entire list of standard metadata constants, followed by sample.

Metadata constants

Metadata Name
Context Data Key
Constant Name
Show
a.media.show
ADBMobile.media.VideoMetadataKeys.SHOW
Season
a.media.season
ADBMobile.media.VideoMetadataKeys.SEASON
Episode
a.media.episode
ADBMobile.media.VideoMetadataKeys.EPISODE
Asset
a.media.asset
ADBMobile.media.VideoMetadataKeys.TMS_ID
Genre
a.media.genre
ADBMobile.media.VideoMetadataKeys.GENRE
First Air Date
a.media.airDate
ADBMobile.media.VideoMetadataKeys.FIRST_AIR_DATE
First Digital Air Date
a.media.digitalDate
ADBMobile.media.VideoMetadataKeys.FIRST_DIGITAL_DATE
Rating
a.media.rating
ADBMobile.media.VideoMetadataKeys.RATING
Originator
a.media.originator
ADBMobile.media.VideoMetadataKeys.ORIGINATOR
Network
a.media.network
ADBMobile.media.VideoMetadataKeys.NETWORK
Show Type
a.media.type
ADBMobile.media.VideoMetadataKeys.SHOW_TYPE
Ad Load
a.media.adLoad
ADBMobile.media.VideoMetadataKeys.AD_LOAD
MVPD
a.media.pass.mvpd
ADBMobile.media.VideoMetadataKeys.MVPD
Authorized
a.media.pass.auth
ADBMobile.media.VideoMetadataKeys.AUTHORIZED
Day Part
a.media.dayPart
ADBMobile.media.VideoMetadataKeys.DAY_PART
Feed
a.media.feed
ADBMobile.media.VideoMetadataKeys.FEED
Stream Format
a.media.format
ADBMobile.media.VideoMetadataKeys.STREAM_FORMAT

Ad metadata constants

Metadata Name
Context Data Key
Constant Name
Advertiser
a.media.ad.advertiser
ADBMobile.media.AdMetadataKeys.ADVERTISER
Campaign ID
a.media.ad.campaign
ADBMobile.media.AdMetadataKeys.CAMPAIGN_ID
Creative ID
a.media.ad.creative
ADBMobile.media.AdMetadataKeys.CREATIVE_ID
Placement ID
a.media.ad.placement
ADBMobile.media.AdMetadataKeys.PLACEMENT_ID
Site ID
a.media.ad.site
ADBMobile.media.AdMetadataKeys.SITE_ID
Creative URL
a.media.ad.creativeURL
ADBMobile.media.AdMetadataKeys.CREATIVE_URL

Sample implementations for Chromecast

Video

// setting Standard Video Metadata as context data on trackLoad API mediaContextData = { } mediaMetadata["videotype"] = "episode"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.SHOW] = "sample show"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.SEASON] = "sample season"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.EPISODE] = "sample episode"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.TMS_ID] = "sample tms_id"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.GENRE] = "sample genre"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.FIRST_AIR_DATE] = "sample first_air_date"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.FIRST_DIGITAL_DATE] = "sample first_digital_date"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.RATING] = "sample rating"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.ORIGINATOR] = "sample originator"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.NETWORK] = "sample network"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.SHOW_TYPE] = "sample show type"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.AD_LOAD] = "sample ad load"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.MVPD] = "sample mvpd"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.AUTHORIZED] = "sample authorized"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.DAY_PART] = "sample day_part"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.FEED] = "sample feed"; standardVideoMetadata[ADBMobile.media.VideoMetadataKeys.STREAM_FORMAT] = "sample format"; var mediaObject = ADBMobile.media.createMediaObject(content.name, content.id, content.length, content.streamType); mediaObject[ADBMobile.media.MediaObjectKey.StandardVideoMetadata] = standardVideoMetadata; ADBMobile.media.trackSessionStart(mediaObject, mediaMetadata);

Audio

// setting Standard Audio Metadata as context data on trackLoad API mediaContextData = { } mediaMetadata["audiotype"] = "podcast"; var standardAudioMetadata = {}; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.ARTIST] = “sample artist”; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.ALBUM] = "sample album" ; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.LABEL] = "sample label"; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.AUTHOR] = "sample author" ; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.STATION] = "sample station " ; standardAudioMetadata[ADBMobile.media.AudioMetadataKeys.PUBLISHER] = "sample publisher"; var mediaObject = ADBMobile.media.createMediaObject(content.name, content.id, content.length, content.streamType, content.mediaType); mediaObject[ADBMobile.media.MediaObjectKey.StandardAudiooMetadata] = standardAudiooMetadata; ADBMobile.media.trackSessionStart(mediaObject, mediaMetadata);

Ads

// setting Standard Ad Metadata as context data on ad start event var standardAdMetadata = {}; standardAdMetadata[ADBMobile.media.AdMetadataKeys.CAMPAIGN_ID] = “sample campaign”; standardAdMetadata[ADBMobile.media.AdMetadataKeys.ADVERTISER] = "sample advertiser" ; standardAdMetadata[ADBMobile.media.AdMetadataKeys.CREATIVE_ID] = "sample creativeid"; standardAdMetadata[ADBMobile.media.AdMetadataKeys.PLACEMENT_ID] = "sample placement id" ; standardAdMetadata[ADBMobile.media.AdMetadataKeys.SITE_ID] = "sample site id" ; standardAdMetadata[ADBMobile.media.AdMetadataKeys.CREATIVE_URL] = "sample creative url"; var adObject = ADBMobile.media.createAdObject(ad.name, ad.id, ad.position, ad.length); adObject[ADBMobile.media.MediaObjectKey.StandardAdMetadata] = standardVideoMetadata; ADBMobile.media.trackEvent(ADBMobile.media.Event.AdStart, this._player.getAdInfo(), adContextData);