Roku Player
This document describes the Roku MediaMelon Player SDK Integration with the Roku media player.
This document describes the Roku MediaMelon Player SDK Integration with the Roku media player.
Step 1: Add the MediaMelon Player SDK
Unzip the MediaMelon Player SDK and place its contents in the MMSmartStream Folder in the components directory of the sample application code downloaded from the link above.
Step 2: Setup a new MediaMelon Player SDK Task
Create a new Task XML named MMTask.xml inside your components folder and give it the following interface. This is used to link the SmartSight Player SDK's Brightscript files into your application.
The MMTask.xml file should contain the following code:
Step 3: Integrate MediaMelon Player SDK Code to the Main Application
Add a child component to the main video scenecustom-playback-channel-master/components/MainScene.xml
Within the main application, after the video instance has been created, create the SmartSight Player SDK Task node, and pass the Video node to it.
Note: <customer_id> is your MediaMelon-assigned Customer ID. If you do not know your Customer ID contact MediaMelon at support@mediamelon.com
Note: There is an upper limit of 3 custom tags that can be sent to SmartSight. If you need to send more tags, please contact your MediaMelon sales representative.
For Live streams ‘contentNode.live’ has to be set to true as shown below:
Step 4: Error handling
In most cases the Error handling in Roku applications is done by an Error Handler at the application level. For passing on the errors to the Media Melon SDK the following code snippet needs to be added to the error handling function.
Step 5: CSAI Ad Tracking using Roku Ad FrameWork
Set the field named mmAdPlaying
to true when an ad break started as shown below:
Variable | Description |
PLAYER_NAME | String containing the Player Name. |
CUSTOMER_ID | String containing your MediaMelon-assigned Customer ID. |
SUBSCRIBER_ID | String containing your Subscriber’s ID. If you do not use subscriber IDs, enter null |
DOMAIN_NAME | String containing your section of your subscriber or assets. (Optional) |
APP_NAME | String containing App Name. |
APP_VERSION | String containing App Version |
SUBSCRIBER_TYPE | String containing the Subscriber Type (e.g. “Free”, “Paid”). If you do not use subscriber types, enter null |
SUBSCRIBER_TAG | String containing an additional subscriber-specific information. This is sent in clear (not hashed) to SmartSight and it is advised to not send sensitive information in this field. |
ASSET_ID | String containing Asset Id. |
ASSET_NAME | String containing Asset Name. |
VIDEO_ID | String containing your video’s ID. If you do not use videos IDs, enter null. |
CONTENT_TYPE | String containing type of the Content. For example - "Movie", "Special", "Clip", "Scene Epis Lifts". |
GENRE | String containing Genre of the content. For example - "Comedy", "Horror". |
DRM_PROTECTION | Widevine, Fairplay, Playready etc. Unknown means content is protected, but protection type is unknown. For clear contents, do not set this field |
EPISODE_NUMBER | String containing sequence number of the Episode. |
SEASON | String containing the Season. For example - "Season1". |
SERIES_TITLE | String containing Title of the Series. |
VIDEO_TYPE | String containing Video Type. For example - "LIVE", "VOD". |
CUSTOM_TAGS | Extra custom metadata can be added here if required. If extra metadata is not required, enter null. |
Last updated