Settings

interface Settings {
    apiUrl?: string;
    assetFolder: string;
    constraintOverrides?: Partial<ConstraintsConfig>;
    displayMediaStream?: boolean;
    logger?: LoggerSettings;
    mediaElement: HTMLDivElement;
    metrics?: boolean;
    mirrorVideo?: boolean;
}

Properties

apiUrl?: string

If the optional apiUrl is not set in the SDK, it will be automatically determined based on the token's region. This effectively ties the frontend region to the token's region, which should be suitable for most use cases. If the optional apiUrl is explicitly set in the SDK, the frontend will communicate with that URL, regardless of the token's region. In this case, it is the implementor’s responsibility to ensure compatibility and prevent potential issues. Results will always be stored in the token's region. Data processing will occur in the frontend's region, as determined by your implementation.

If the backend only registers a license and returns a device token to perform an anonymous measurement, the token’s region will match the region specified in the backend's API_URL.

However, if the backend first registers a license to obtain a device token and then uses that token to log in a user and return the new tokens to the frontend, the region will be determined by the user token, not the device token. This means that if the user was originally created in the eu-central but the device token is in na-east, then the region would be eu-central.

assetFolder: string
constraintOverrides?: Partial<ConstraintsConfig>
displayMediaStream?: boolean
mediaElement: HTMLDivElement
metrics?: boolean
mirrorVideo?: boolean