Skip to main content
Version: 9.12.0

Conviva Connector API reference

The attributes, methods and events for the THEOConvivaConnector.

Attributes

NameTypeDefaultAccess PermissionDescription
idstringread, writeThe ID of this node

Methods

MethodParamsDescription
configureplayer: THEOplayer, customerKey: string, gatewayUrl: string (Optional), debug: boolean (Optional)Configure the Conviva SDK for use. The gatewayUrl param is the URL for the Touchstone service for use in validating your Conviva integration. Omit this for production builds.
destroynoneDestroy the connector. It also ends the current session, if any.
endSessionnoneEnd the current Conviva session, but do not destroy the connector.
getContentInfononeReturns the content metadata for the current session.
monitorCdnChangesmappings: CDNMonitoringConfig, defaultCdn: string (optional)Updates the CDN monitoring settings. If passed a CDN monitoring config (see below), it will begin monitoring the downloaded segments for changes in CDN. This will update the defaultReportingResource for the current session if a CDN change is detected If passed invalid as the first parameter, it will stop the monitoring and use any string passed as the second param as the defaultReportingResource.
reportPlaybackEventeventType: string, eventDetail: AssociativeArrayReports a playback event with the associated data to Conviva.
reportPlaybackFailederrorMessage: stringReports a playback failure to Conviva.
setAdInfoadInfo: AssociativeArraySets the supplied ad info to Conviva. adInfo should be in the form of ConvivaContentInfo
setContentInfocontentMetadata: AssociativeArraySets or updates the content metadata for the current session. Partials are supported and will be merged with the existing content metadata. See below for the schema of content metadata.
startSessioncontentMetadata: AssociativeArrayStarts a Conviva session with the supplied content metadata. See below for the schema of content metadata.
stopAndStartNewSessioncontentMetadata: AssociativeArrayStops the existing Conviva session and starts a new one with the supplied content metadata. See below for the schema of content metadata.

DPI Methods

The THEO Conviva Connector now exposes methods for Conviva DPI (Digital Product Insights) integration that the application can use to report application level analytics. If you are using Conviva for both DPI and Video, call configureDPI first for application analytics, then call configure when you have access to the player. In depth documentation for the parameters passed to these methods is provided in the (Conviva DPI Integration guide)[https://pulse.conviva.com/learning-center/content/sensor_developer_center/sensor_integration/roku/roku_stream_sensor.htm#ConvivaDPISensorIntegrationforRoku]:

MethodParamsDescription
configureDPIappId: string, customerKey: string, gatewayUrl: string (Optional), debug: boolean (Optional)Configure the Conviva SDK for use for Conviva DPI. The gatewayUrl param is the URL for the Touchstone service for use in validating your Conviva integration. Omit this for production builds.
setUserIduserId: stringSet the user ID for this DPI session.
setChannelInfochannelInfo: assocarraySet the channel load times for this DPI session.
trackCustomEventeventName: string, eventData: assocarrayReport a custom DPI event to Conviva.
trackClickclickDetails: assocarrayReport a click event.
trackAppErrorerror: assocarrayReport an application error.
trackNetworkRequestrequestDetails: assocarrayReport the stats for a network request.
setCustomTagscustomTags: assocarrayAdd custom tags to this DPI session.
unsetCustomTagscustomTags: array of stringsRemove custom tags from this DPI session.

CDN Monitoring Config

The configuration for CDN monitoring should be an AssociativeArray with keys that are the name of the CDN and values that are arrays of strings to search for in segment URLs.

cdnMappings = {
akamai: ["akamaized.net"],
theo: ["dev.theoads.live", "cdn.theoplayer.com"]
level3: ["llnw.com"]
}

Passing a config as the only param will start CDN change monitoring with the provided configuration, or update the config if it is already started. m.theoConvivaConnector.callFunc("monitorCDNChanges", cdnMappings) However, if you want to stop CDN change monitoring, pass invalid as the first parameter, and the string you want to use for the defaultReportingResource as the second parameter. m.theoConvivaConnector.callFunc("monitorCDNChanges", invalid, "theo")

Content Metadata

Content metadata should be an AssociativeArray following Conviva's schema. However, the THEOConviaConnector does provide a shortcut for c3 data. You may specify the c3 data by its full name:

contentMetadata = {
customMetadata: {
myCustomTag: "Value",
"c3.cm.contentType": "DVR",
"c3.cm.name": "CMS"
}
}

However, we also support using an object notation:

contentMetadata = {
customMetadata: {
myCustomTag: "Value",
c3: {
cm: {
contentType: "DVR",
name: "CMS"
}
}
}
}