Skip to main content
Version: v1.10.1

Class: Config

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

Constructors

constructor

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

Parameters

NameTypeDefault value
ingestEndpoint?stringundefined
logLevel?LogLevelsundefined
streamConfigStreamConfigBASIC_LANDSCAPE
logger?Partial<Logger>undefined
networkReconnectConfigNetworkReconnectConfigdefaultNetworkReconnectConfig

Properties

BASIC_FULL_HD_LANDSCAPE

BASIC_FULL_HD_LANDSCAPE: StreamConfig = BASIC_FULL_HD_LANDSCAPE


BASIC_FULL_HD_PORTRAIT

BASIC_FULL_HD_PORTRAIT: StreamConfig = BASIC_FULL_HD_PORTRAIT


BASIC_LANDSCAPE

BASIC_LANDSCAPE: StreamConfig = BASIC_LANDSCAPE


BASIC_PORTRAIT

BASIC_PORTRAIT: StreamConfig = BASIC_PORTRAIT


LOG_LEVEL

LOG_LEVEL: typeof LogLevels = LogLevels


STANDARD_LANDSCAPE

STANDARD_LANDSCAPE: StreamConfig = STANDARD_LANDSCAPE


STANDARD_PORTRAIT

STANDARD_PORTRAIT: StreamConfig = STANDARD_PORTRAIT

Accessors

ingestEndpoint

get ingestEndpoint(): undefined | string

Get the ingest endpoint from the config file.

Returns

undefined | string

The ingest endpoint.

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

NameTypeDescription
newIngestEndpointundefined | stringThe new value of the ingestEndpoint property.

Returns

void


logLevel

get logLevel(): undefined | LogLevels

Get the log level.

Returns

undefined | LogLevels

The log level.

set logLevel(newLogLevel): void

Set the log level to the given value.

Parameters

NameTypeDescription
newLogLevelunknownThe new log level to set.

Returns

void


logger

get logger(): undefined | Partial<Logger>

Get the logger property from the config.

Returns

undefined | Partial<Logger>

The logger property is being returned.

set logger(newLogger): void

Set the logger property.

Parameters

NameTypeDescription
newLoggerundefined | Partial<Logger>The new logger to set.

Returns

void


networkReconnectConfig

get networkReconnectConfig(): undefined | NetworkReconnectConfig

Get the network reconnect configuration

Returns

undefined | NetworkReconnectConfig

The network reconnect config property is being returned.

set networkReconnectConfig(newNetworkReconnectConfig): void

Set the network reconnect config property.

Parameters

NameTypeDescription
newNetworkReconnectConfigundefined | NetworkReconnectConfigThe new network reconnect config to set.

Returns

void


streamConfig

get streamConfig(): StreamConfig

Get the stream config.

Returns

StreamConfig

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

set streamConfig(newStreamConfig): void

Set the streamConfig property to the newStreamConfig parameter.

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

Parameters

NameTypeDescription
newStreamConfigunknownThe new stream configuration.

Returns

void