The following page contains instructions on how to integrate using Roku SceneGraph library for a few advanced use cases, such as reporting live program and playlist changes, fatal errors, etc. After completing the initial stream sensor integration, use these instructions as an add-on to achieve specific goals.
Report Live, Live Linear, or FAST Program Changes
Report program changes during live, live linear, or FAST streaming
Users may switch from one program to another at the program boundary either during live or live linear streaming. To report such changes, use the videoAnalytics.setContentInfo(newContentInfo) API and update the asset name that has changed at the program boundary.
The following is the sample code:
// update ASSET_NAME and any other metadata that has changed.
newcontentInfo = {}
newcontentInfo.assetName = "Asset name of the next program"
'Update the current session with metadata changes:
conviva.setOrUpdateContentInfo(videoNode, newcontentInfo)
Report Errors
Playback does not recover from error and is reported once only
Playback encounters a fatal error from which it does not recover. Use the conviva.reportContentError(videoNode, errorMessage, conviva.ERROR_SEVERITY.FATAL) API to report this to Conviva, so that Conviva can close the monitoring session.
The following is the sample code:
conviva.reportContentError(videoNode, errorMessage, conviva.ERROR_SEVERITY.FATAL)
Playback is not impacted due to a warning error type
The player or application encountered an error that does not impact video playback. However, if you still want to report it, then ensure to report it as WARNING. Invoke the conviva.reportContentError(videoNode, errorMessage, conviva.ERROR_SEVERITY.WARNING) API to report the error severity as a warning.
The following is the sample code:
conviva.reportContentError(videoNode, errorMessage, conviva.ERROR_SEVERITY.WARNING)
Optimize Monitoring During User Wait State
User Actions: User Dialogues
Conviva prefers to optimize certain portions of monitoring during user wait state, so that it does not inaccurately reflect in metrics like VST. For that, monitoring must be turned off when video playback request is halted due to user dialogues like:
pin popup
accepting strong language or violence
confirming age
startover or resume dialogue
watch party initiation
These user dialogues can be handled using the following APIs:
On user wait started:
conviva.setContentPauseMonitoring (videoNode)
On user wait ended:
conviva.setContentResumeMonitoring (videoNode)