Skip to main content
Version: 8.14.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.

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"
}
}
}
}