QuanteecConfig
The configuration of QUANTEEC for react native players can be customized by using a QUANTEEC configuration object.
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>"
}
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).
Configuration
The QUANTEEC configuration is an object that accepts the following parameters:
Parameters | Type | Default | Description |
---|---|---|---|
activated | Boolean | true | Activate/deactivate Quanteec, including the connection with the controller. This value overrides p2p.activated which does not stop the connection to the controller. |
analyticsVideoID | String | The videoID of the video | Specific name to identify a video for the analytics process. By default, videoID is used. |
cellularActivated | Boolean | true | Activates or deactivates the possibility to send data if the device is connected to a cellular network |
checkUrls | Boolean | false | If 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. |
collections | Array<String> | null | Collections of the video. Used in the panel to sort and manage the parameters of QUANTEEC for several videos at the same time. |
ignoreTokenInUrls | String (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. |
logLevel | Number | 0 | Indicates 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 |
maxUploadPercent | Number | 0.5 | Percentage of upload to use. Number between 0 and 1. If 0, nothing is sent, but the peer still receives data. |
p2pActivated | Boolean | true | Activates QUANTEEC P2P system. |
quanteecKey Required | String | Your personal QUANTEEC key used to authenticate the plugin. This parameter is mandatory | |
tracker | String | Url of the tracker. Used only in specific scenarios where the signalling/controller server is deployed on premises. | |
videoID | String | The url of the videoSource | Specific name to identify a video in the QUANTEEC system. Useful if the videosource url contains a token which is different for every user. |
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.
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>"
}