Skip to main content

QuanteecConfig

public class QuanteecConfig

A class for setting up the initial parameters of a QuanteecCore

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

Summary​

Public fields​

booleanactivated
StringanalyticsVideoID
booleancellularActivated
booleancheckUrls
ArrayList<String>collections
intcontrollerID
StringignoreTokenInUrls
StringlogLevel
StringmanifestUrl
intminSdk
booleanlowLatency
intmaxMemoryAllocation
doublemaxUploadPercent
intnumberOfSegmentsToKeep
booleanp2pActivated
Stringp2pConfiguration
StringquanteecKey
boolean sendingActivated  
Android only
Stringtracker
StringvideoID

Public constructors​

QuanteecConfig(String videoID, String quanteecKey)

Public fields​

activated​

public boolean activated

Activate or deactivate QUANTEEC, including the connection with the controller and the analytics retrieval. This value overrides p2pActivated, which does not stop the connection to the controller.

Default value: true

analyticsVideoID​

public String analyticsVideoID

Specific name to identify a video for the analytics process. By default, the videoID is used.

Default value: The value of the videoID

cellularActivated​

public boolean cellularActivated

Indicates if data can be sent or not when QUANTEEC is used on a cellular network. If true, the device will not be allowed to send data to other viewers through P2P (but it can still receive the data through P2P).

Default value: true

checkUrls​

public boolean checkUrls

If true, QUANTEEC checks the url of the segments in addition to the segment number, before sending the data in P2P. It is useful for Server-Side Ad-Insertion (SSAI) use cases when different viewers may have different ads.

Default value: false

collections​

public ArrayList<String> collections

A list of collections to which the video belongs. It is useful for analytics purposes.

controllerID​

public int controllerID

Identifies the tracker connection associated with a player. QUANTEEC allows only one active tracker connection for a given controllerID: when a replacement player starts with the same ID, its connection is opened after the previous connection has closed.

Use a different value for each player that must run simultaneously in the same application.

QuanteecConfig config = new QuanteecConfig.Builder("<your-quanteec-key>")
.setControllerID(2)
.build();

Default value: 1

Available since: 1.9.2

ignoreTokenInUrls​

public String ignoreTokenInUrls

A string that can contain a regular expression. It is useful in cases where checkUrls is set to true. The URLs will be checked without the regex defined in ignoreTokenInUrls. It is useful if the url embeds a unique token for every viewer for security reasons.

Default value: ""

logLevel​

public int logLevel

Indicates the loglevel of the plugin.
4 levels are possible: MyLogger.LOG_LEVEL_ERROR, MyLogger.LOG_LEVEL_INFOS, MyLogger.LOG_LEVEL_DEBUG, MyLogger.LOG_LEVEL_TRACE.

Default value: MyLogger.LOG_LEVEL_INFOS

manifestUrl​

public String manifestUrl

URL of the main content manifest. When set, QUANTEEC only recognizes this manifest and its associated HLS playlists as content manifests. Other manifests are handled as regular data, which is useful for playback workflows that include client-side ads.

QuanteecConfig config = new QuanteecConfig.Builder("<your-quanteec-key>")
.setManifestUrl("<manifest-url>")
.build();

Default value: "" (all manifests are accepted)

Available since: 1.8.34

minSdk​

public int minSdk

Defines the minimum Android API level on which QUANTEEC is enabled. On devices running an older Android version, playback continues through the player's standard HTTP data source without enabling QUANTEEC.

QuanteecConfig config = new QuanteecConfig.Builder("<your-quanteec-key>")
.setMinSdk(Build.VERSION_CODES.O)
.build();

Default value: Build.VERSION_CODES.N (API level 24 / Android 7.0)

The configured value cannot be lower than the Android SDK's build minimum (API level 21).

Available since: 1.9.1

lowLatency​

public boolean lowLatency

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.

Default value: false

maxMemoryAllocation​

public int maxMemoryAllocation

Maximum memory allocation in MB for the QUANTEEC cache. This parameter controls how much memory can be used to store video segments. The segments saved in cache will be limited by either the maxMemoryAllocation or the numberOfSegmentsToKeep, whichever limit is reached first.

Default value: 64

maxUploadPercent​

public double maxUploadPercent

Percentage of upload bandwidth to use. Number between 0 and 1. If 0, nothing is sent, but the peer still receives data.

Default value: 0.5

numberOfSegmentsToKeep​

public int numberOfSegmentsToKeep

Number of segments to keep in the cache. This parameter defines how many video segments should be retained in memory for P2P sharing. The segments saved in cache will be limited by either the maxMemoryAllocation or the numberOfSegmentsToKeep, whichever limit is reached first.

Default value: 20

p2pActivated​

public double p2pActivated

Activates QUANTEEC P2P system.

Default value: true

info

When setting this parameter to false, all the exchanges between the viewers are not allowed.
To deactivate data sending ONLY, set the parameters maxUploadPercent to 0 or sendingActivated to false . This will allow the viewers to receive data from other viewers, but sending data will not be allowed.

p2pConfiguration​

public String p2pConfiguration

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.

quanteecKey​

public String quanteecKey

Your personal QUANTEEC key, used to authenticate the plugin.

Default value: ""

sendingActivated​

public boolean sendingActivated

Activate or deactivate data sending in P2P.
Setting this parameter to false gives the same result as setting maxUploadPercent to '0'.

Default value: true

tracker​

public String tracker

Used to define a specific URL for the tracker. Used only in specific scenarios where the signaling server is deployed on premises.

Default value: ""

videoID​

public String videoID

Specific name to identify a video in the QUANTEEC system. It is useful if the video source URL contains a token that is different for every viewer.

Default value: The URL of the source

Public constructors​

QuanteecConfig ()​

public QuanteecConfig(String videoID, String quanteecKey)

Parameters​

NameTypeDescription
videoIDStringSpecific name to identify a video in the QUANTEEC system. Useful if the video source URL contains a token that is different for every viewer.
quanteecKeyStringYour personal QUANTEEC key used to authenticate the plugin.