Skip to main content

QuanteecConfig

The configuration of QUANTEEC for the web players can be customized by passing a QUANTEEC configuration to the QUANTEEC Core constructors.

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.
collectionString""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"]'.
controllerStringUrl of the controller. Used only in specific scenarios where the signalling/controller server is deployed on premises.
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: Quanteec.LOG_LEVEL_ERROR, Quanteec.LOG_LEVEL_INFOS, Quanteec.LOG_LEVEL_DEBUG, Quanteec.LOG_LEVEL_TRACE. Default value: Quanteec.LOG_LEVEL_INFOS
lowLatencyBooleanfalseActivates 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.
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.
p2pConfigurationString""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.
p2pOptimizedStartBooleanfalseIf true, slow down the download speed of the very first segments in order to create P2P connections as fast as possible.
quanteecKey
Required
StringYour personal QUANTEEC key used to authenticate the plugin. This parameter is mandatory
useSubnetsBooleanfalseGet the private IP of the peer to group the peers according to the subnetwork rules defined in the Panel
validateDataBooleanfalseValidate 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.
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.
withCredentials
Web only
BooleanfalseSends the HTTP requests with credentials.

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>",
useSubnets: false,
validateData: false,
videoID: "<enter-your-custom-videoID>"
withCredentials: false
}