Skip to main content

QuanteecConfig

The configuration of QUANTEEC for react native players can be customized by using a QUANTEEC configuration object.

info

To create a new QUANTEEC configuration and/or retrieve your default QUANTEEC key, you must first go to the Config page of your panel.

Most of the time, the configuration object is as simple as:

var quanteecConfig = {
quanteecKey: "<your-quanteec-key>",
videoID: "<enter-your-custom-videoID>"
}
warning

In your QUANTEEC configuration, remember to set a different videoID if you have different formats of the same stream (e.g., one DASH stream and one HLS stream) or two variants of the same stream (one stream with English audio and one stream with another language).

Click here to find more informations on videoID

Configuration

The QUANTEEC configuration is an object that accepts the following parameters:

ParametersTypeDefaultDescription
activatedBooleantrueActivate/deactivate Quanteec, including the connection with the controller. This value overrides p2p.activated which does not stop the connection to the controller.
analyticsVideoIDStringThe videoID of the videoSpecific name to identify a video for the analytics process. By default, videoID is used.
cellularActivatedBooleantrueActivates or deactivates the possibility to send data if the device is connected to a cellular network
checkUrlsBooleanfalseIf true, the plugin will check that the url of the segment is the same before sending the data in P2P. Useful for Server-Side Ad Isertion (SSAI) use cases where users may not request the same segments every time.
collectionsArray<String>nullCollections of the video. Used in the panel to sort and manage the parameters of QUANTEEC for several videos at the same time.
ignoreTokenInUrlsString (Js Regex)""If checkUrls is true, the urls will be checked WITHOUT the regex defined in ignoreTokenInUrls. Useful if the url embeds an unique token for every user, for security reasons.
logLevelNumber0Indicates the loglevel of the plugin. 4 levels are available: Error which correspond to 0, Infos which correspond to 1, Debug which correspond to 2 and Trace which correspond to 3
maxUploadPercentNumber0.5Percentage of upload to use. Number between 0 and 1. If 0, nothing is sent, but the peer still receives data.
p2pActivatedBooleantrueActivates QUANTEEC P2P system.
quanteecKey
Required
StringYour personal QUANTEEC key used to authenticate the plugin. This parameter is mandatory
trackerStringUrl of the tracker. Used only in specific scenarios where the signalling/controller server is deployed on premises.
videoIDStringThe url of the videoSourceSpecific name to identify a video in the QUANTEEC system. Useful if the videosource url contains a token which is different for every user.
caution

Setting the parameter activated to true in the main configuration will completely deactivate the QUANTEEC plugin. The viewers will not connect to each other (there will therefore be no P2P) and no analytics will appear in the QUANTEEC panel.

info

Setting the parameter p2pActivated to true in the P2P will deactivate all the exchanges between the viewers. To deactivate data transmission, you must set the parameters maxUploadPercent to 0. This will allow the viewers to receive data both from CDN and from other viewers in P2P but they will not be allowed to send video.

Full example

var quanteecConfig {
activated: true,
analyticsVideoID: "analyticsID"
cellularActivated: true,
checkUrls:false,
collection: "",
ignoreTokenInUrls: "",
lowLatency: false,
maxUploadPercent: 0.5,
p2pActivated: true,
quanteecKey: "<your-quanteec-key>",
tracker: ""
videoID: "<enter-your-custom-videoID>"
}