QuanteecConfig
The configuration of QUANTEEC for the web players can be customized by passing a QUANTEEC configuration to the QUANTEEC Core constructors.
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. |
collection | String | "" | Collection of the video. Used in the panel to sort and manage the parameters of QUANTEEC for several videos at the same time. Collection can be a string representing a JSON array of strings to define several collections at once. For example: '["Coll1", "Coll2", "Coll3"]'. |
controller | String | Url of the controller. Used only in specific scenarios where the signalling/controller server is deployed on premises. | |
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: Quanteec.LOG_LEVEL_ERROR, Quanteec.LOG_LEVEL_INFOS, Quanteec.LOG_LEVEL_DEBUG, Quanteec.LOG_LEVEL_TRACE. Default value: Quanteec.LOG_LEVEL_INFOS |
lowLatency | Boolean | false | Activates or deactivates the low-latency mode of QUANTEEC. Only set this value to true for low-latency streams, using DASH-LL or HLS-LL. Low-latency is currently only supported for dash.js and hls.js |
lowLatencyBufferLimit WebRTS only | Number | -1 (Not activated) | The low buffer level, in milliseconds. When the buffer level is lower than the value lowLatencyBufferLimit, the P2P request is dropped and the remaining bytes are requested in HTTP. If -1, uses the "bufferLimitLow" of the player. |
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. |
p2pConfiguration | String | "" | Select a collection and use the P2P configurations associated with this configuration for this plugin. If the name of the collection is invalid, the configuration used will fall back to the configuration selected for this video in the panel. |
p2pOptimizedStart | Boolean | false | If true, slow down the download speed of the very first segments in order to create P2P connections as fast as possible. |
quanteecKey Required | String | Your personal QUANTEEC key used to authenticate the plugin. This parameter is mandatory | |
useSubnets | Boolean | false | Get the private IP of the peer to group the peers according to the subnetwork rules defined in the Panel |
validateData | Boolean | false | Validate the data received in P2P with the help of the CDN for every single segments. This feature needs the CDN to support Range HTTP requests. |
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. |
withCredentials Web only | Boolean | false | Sends the HTTP requests with credentials. |
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>",
useSubnets: false,
validateData: false,
videoID: "<enter-your-custom-videoID>"
withCredentials: false
}