Skip to main content
Version: v1.19.0

Config

The Config class is a singleton that holds the configuration for the application

Constructors

new Config()

new Config(ingestEndpoint?, logLevel?, streamConfig?, logger?, networkReconnectConfig?): Config

Parameters

ParameterTypeDefault value
ingestEndpoint?stringundefined
logLevel?LogLevelsundefined
streamConfig?StreamConfigBASIC_LANDSCAPE
logger?Partial<Logger>undefined
networkReconnectConfig?NetworkReconnectConfigdefaultNetworkReconnectConfig

Returns

Config

Properties

BASIC_FULL_HD_LANDSCAPE

BASIC_FULL_HD_LANDSCAPE: StreamConfig


BASIC_FULL_HD_PORTRAIT

BASIC_FULL_HD_PORTRAIT: StreamConfig


BASIC_LANDSCAPE

BASIC_LANDSCAPE: StreamConfig


BASIC_PORTRAIT

BASIC_PORTRAIT: StreamConfig


LOG_LEVEL

LOG_LEVEL: typeof LogLevels = LogLevels


STANDARD_LANDSCAPE

STANDARD_LANDSCAPE: StreamConfig


STANDARD_PORTRAIT

STANDARD_PORTRAIT: StreamConfig

Accessors

ingestEndpoint

Get Signature

get ingestEndpoint(): undefined | string

Get the ingest endpoint from the config file.

Returns

undefined | string

The ingest endpoint.

Set Signature

set ingestEndpoint(newIngestEndpoint): void

Set the ingest endpoint to the new value, and validates that the new value is valid. If the rtmps ingest server is provided, this function attempts to converts it to a valid 'https' endpoint. If the provided ingest endpoint is invalid, it throws an error.

Parameters
ParameterTypeDescription
newIngestEndpointundefined | stringThe new value of the ingestEndpoint property.
Returns

void


logger

Get Signature

get logger(): undefined | Partial<Logger>

Get the logger property from the config.

Returns

undefined | Partial<Logger>

The logger property is being returned.

Set Signature

set logger(newLogger): void

Set the logger property.

Parameters
ParameterTypeDescription
newLoggerundefined | Partial<Logger>The new logger to set.
Returns

void


logLevel

Get Signature

get logLevel(): undefined | LogLevels

Get the log level.

Returns

undefined | LogLevels

The log level.

Set Signature

set logLevel(newLogLevel): void

Set the log level to the given value.

Parameters
ParameterTypeDescription
newLogLevelunknownThe new log level to set.
Returns

void


networkReconnectConfig

Get Signature

get networkReconnectConfig(): undefined | NetworkReconnectConfig

Get the network reconnect configuration

Returns

undefined | NetworkReconnectConfig

The network reconnect config property is being returned.

Set Signature

set networkReconnectConfig(newNetworkReconnectConfig): void

Set the network reconnect config property.

Parameters
ParameterTypeDescription
newNetworkReconnectConfigundefined | NetworkReconnectConfigThe new network reconnect config to set.
Returns

void


streamConfig

Get Signature

get streamConfig(): StreamConfig

Get the stream config.

Returns

StreamConfig

The streamConfig property is a getter that returns the streamConfig property of the class.

Set Signature

set streamConfig(newStreamConfig): void

Set the streamConfig property to the newStreamConfig parameter.

The function is a setter, so it has a special name

Parameters
ParameterTypeDescription
newStreamConfigunknownThe new stream configuration.
Returns

void