TRROSDK initialization options.
Top-level config including cloud mode, signaling endpoint, device credentials, event observer, logger, and custom-message options. See each field below for details.
Members
cloudMode :CloudMode
Cloud mode (default: 'private')
serverIp :string|Array
Signaling server IP/domain (required for private cloud)
- string |
Array
port :number
Signaling server port (default: 3000/443 for private cloud)
- number
targetIp :string
- string
- Deprecated
- Yes
targetPort :number
- number
- Deprecated
- Yes
https :boolean
Enable HTTPS (forced for public cloud)
- boolean
mqttOptions :object
MQTT configuration
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
url | string | | <optional> | |
port | number | <optional> | |
forceLogin | boolean | <optional> | |
enableLog | boolean | <optional> | Enable MQTT low-level logging
|
sdkMode :SDKMode
Service mode (default: server2 for public cloud)
projectId :number|string
Project ID
- number |
string
remoteDeviceId :string
Remote device ID
- string
password :string
Device password
- string
observer :TRROMediaObserver
Event observer
loggerOption :object
Logger configuration
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
showLog | boolean | <optional> | |
reportLog | boolean | <optional> | |
logLevel | 'DEBUG' | | <optional> | Minimum log level (inclusive) to print to console. Logs below this level are not printed. Order from low to high: 'DEBUG' < 'LOG' < 'INFO' < 'WARN' < 'ERROR'. Requires |
reportLevel | 'DEBUG' | | <optional> | Minimum log level (inclusive) to report. Logs below this level are not reported. Order from low to high: 'DEBUG' < 'LOG' < 'INFO' < 'WARN' < 'ERROR'. Requires |
log | function | <optional> | |
error | function | <optional> | |
warn | function | <optional> | |
info | function | <optional> | |
debug | function | <optional> |
customMessageOption :object
Custom-message (onControlData) options
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
preferArrayBuffer | boolean | <optional> | Whether to unify the
Only affects the SCTP DataChannel path ( |