Roku metadata keys roku-metadata-keys
Standard video, audio, 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.
Video metadata constants video-metadata-constants
Metadata Name
Context Data Key
Constant Name
Show
a.media.showMEDIA_VideoMetadataKeySHOWSeason
a.media.seasonMEDIA_VideoMetadataKeySEASONEpisode
a.media.episodeMEDIA_VideoMetadataKeyEPISODEAsset
a.media.assetMEDIA_VideoMetadataKeyASSET_IDGenre
a.media.genreMEDIA_VideoMetadataKeyGENREFirst Air Date
a.media.airDateMEDIA_VideoMetadataKeyFIRST_AIR_DATEFirst Digital Air Date
a.media.digitalDateMEDIA_VideoMetadataKeyFIRST_DIGITAL_DATERating
a.media.ratingMEDIA_VideoMetadataKeyRATINGOriginator
a.media.originatorMEDIA_VideoMetadataKeyORIGINATORNetwork
a.media.networkMEDIA_VideoMetadataKeyNETWORKShow Type
a.media.typeMEDIA_VideoMetadataKeySHOW_TYPEAd Load
a.media.adLoadMEDIA_VideoMetadataKeyAD_LOADMVPD
a.media.pass.mvpdMEDIA_VideoMetadataKeyMVPDAuthorized
a.media.pass.authMEDIA_VideoMetadataKeyAUTHORIZEDDay Part
a.media.dayPartMEDIA_VideoMetadataKeyDAY_PARTFeed
a.media.feedMEDIA_VideoMetadataKeyFEEDStream Format
a.media.formatMEDIA_VideoMetadataKeySTREAM_FORMATAudio metadata constants audio-metadata-constants
Metadata Name
Context Data Key
Constant Name
Artist
a.media.artistMEDIA_AudioMetadataKeyARTISTAlbum
a.media.albumMEDIA_AudioMetadataKeyALBUMLabel
a.media.labelMEDIA_AudioMetadataKeyLABELAuthor
a.media.authorMEDIA_AudioMetadataKeyAUTHORStation
a.media.stationMEDIA_AudioMetadataKeySTATIONPublisher
a.media.publisherMEDIA_AudioMetadataKeyPUBLISHERAd metadata constants ad-metadata-constants
Metadata Name
Context Data Key
Constant Name
Advertiser
a.media.ad.advertiserMEDIA_AdMetadataKeyADVERTISERCampaign ID
a.media.ad.campaignMEDIA_AdMetadataKeyCAMPAIGN_IDCreative ID
a.media.ad.creativeMEDIA_AdMetadataKeyCREATIVE_IDPlacement ID
a.media.ad.placementMEDIA_AdMetadataKeyPLACEMENT_IDSite ID
a.media.ad.siteMEDIA_AdMetadataKeyPLACEMENT_IDCreative URL
a.media.ad.creativeURLMEDIA_AdMetadataKeyCREATIVE_URLConstants constants
You can use the following constants to track media events:
Other constants
Constant
Description
ERROR_SOURCE_PLAYERConstant for Error source being Player
MediaObjectkey constants (Used as keys within MediaObject instances)
Constant
Description
MEDIA_STANDARD_MEDIA_METADATAConstant to set metadata on the
MediaInfo trackLoadMEDIA_STANDARD_AD_METADATAConstant to set the ad metadata on the
EventData trackEventMEDIA_RESUMEDConstant for sending a video-resumed heartbeat. To resume video tracking of previously stopped content, you need to set the
For example, say a user watches 30% of the content, then closes the app. This will lead to the session being ended. Later, if the same user returns to the same content, and the application allows that user to resume from the same point where they left off, then the application should set
This will create a new session for the video, but it also causes the SDK to send a heartbeat request with the event type “resume”, which can be used in reporting to tie two different media sessions together.
MEDIA_RESUMED property on the mediaInfo object when you call mediaTrackLoad. (MEDIA_RESUMED is not an event that you can track using the mediaTrackEvent API.) MEDIA_RESUMED should be set to true when an application wants to continue to track content that a user stopped watching but now intends to resume watching.For example, say a user watches 30% of the content, then closes the app. This will lead to the session being ended. Later, if the same user returns to the same content, and the application allows that user to resume from the same point where they left off, then the application should set
MEDIA_RESUMED to “true” while calling the mediaTrackLoad API. The result is that these two different media sessions for the same video content can be linked together. Following is the implementation example:mediaInfo =adb_media_init_mediainfo("test_media_name","test_media_id",10,"vod")mediaInfo[ADBMobile().MEDIA_RESUMED] = truemediaContextData = {}ADBMobile().mediaTrackLoad(mediaInfo, mediaContextData)This will create a new session for the video, but it also causes the SDK to send a heartbeat request with the event type “resume”, which can be used in reporting to tie two different media sessions together.
Content type constants
Constant
Description
MEDIA_STREAM_TYPE_LIVEConstant for Stream Type LIVE
MEDIA_STREAM_TYPE_VODConstant for Stream Type VOD
Event Type Constants (Used for the trackEvent call)
Constant
Description
MEDIA_BUFFER_STARTEvent Type for Buffer Start
MEDIA_BUFFER_COMPLETEEvent Type for Buffer Complete
MEDIA_SEEK_STARTEvent Type for Seek Start
MEDIA_SEEK_COMPLETEEvent Type for Seek Complete
MEDIA_BITRATE_CHANGEEvent Type for Bitrate change
MEDIA_CHAPTER_STARTEvent Type for Chapter Start
MEDIA_CHAPTER_COMPLETEEvent Type for Chapter Complete
MEDIA_CHAPTER_SKIPEvent Type for Ad Start
MEDIA_AD_BREAK_STARTEvent Type for Ad Start
MEDIA_AD_BREAK_COMPLETEEvent Type for AdBreak Complete
MEDIA_AD_BREAK_SKIPEvent Type for AdBreak Skip
MEDIA_AD_STARTEvent Type for Ad Start
MEDIA_AD_COMPLETEEvent Type for Ad Complete
MEDIA_AD_SKIPEvent Type for Ad Skip
recommendation-more-help
c8eee520-cef5-4f8c-a38a-d4952cfae4eb