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.
alignDashPeriodBoundariesBooleanfalseShaka only. Aligns DASH period boundaries with the end of the preceding period’s last segment.
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 Insertion (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.
iceServersArrayArray with iceServers used by Quanteec WebRTC connections. Should be compatible with WebRTC object available here. Example: iceServers:[{urls:["stun:localhost:3478"]},{urls:["turn:localhost:3478"], username:"username", credential:"password"}]
ignoreTokenInUrlsString or RegExpEmpty patternRemoves every match of this pattern from segment URLs before comparison. Useful with checkUrls when URLs contain a viewer-specific token. The SDK compiles the pattern with the global flag.
logLevelNumber or String1Default console log level. Supported levels are Quanteec.LOG_LEVEL_NONE (0), Quanteec.LOG_LEVEL_ERROR (1), Quanteec.LOG_LEVEL_INFOS (2), warning (2.5), Quanteec.LOG_LEVEL_DEBUG (3), and Quanteec.LOG_LEVEL_TRACE (4). Also accepts error, errors, info, infos, debug, and trace.
logLevelScopedObjectEmpty objectOverrides the log level for individual components. Keys are case-sensitive component names. For example, { ShakaAdapter: "debug" }.
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
serversArrayArray of CDN server base URLs for multi-CDN selection. Accepts strings (e.g. ["https://cdn1.example.com", "https://cdn2.example.com"]) or objects with name, url, and useFirst properties (e.g. [{name: "cdn1", url: "https://cdn1.example.com", useFirst: true}]). CDN selector activates automatically when 2+ servers are configured. See CDN selector for details.
showLogScopeBooleanfalseIncludes the component name in console log messages.
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 false 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 false 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,
alignDashPeriodBoundaries: false, // Shaka only
analyticsVideoID: "analyticsID",
cellularActivated: true,
checkUrls:false,
collection: "",
ignoreTokenInUrls: "",
logLevel: 1,
logLevelScoped: {},
lowLatency: false,
maxUploadPercent: 0.5,
p2pActivated: true,
showLogScope: false,
quanteecKey: "<your-quanteec-key>",
useSubnets: false,
validateData: false,
videoID: "<enter-your-custom-videoID>",
withCredentials: false
}