Class: Config
The Config class is a singleton that holds the configuration for the application
Constructors
constructor
• new Config()
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
Name | Type | Description |
---|---|---|
newIngestEndpoint | undefined | string | The new value of the ingestEndpoint property. |
Returns
void
The ingest endpoint.
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
Name | Type | Description |
---|---|---|
newLogLevel | unknown | The new log level to set. |
Returns
void
The log level.
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
Name | Type | Description |
---|---|---|
newLogger | undefined | Partial <Logger > | The new logger to set. |
Returns
void
The logger property is being returned.
streamConfig
• get
streamConfig(): StreamConfig
Get the stream config.
Returns
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
Name | Type | Description |
---|---|---|
newStreamConfig | unknown | The new stream configuration. |
Returns
void
The streamConfig property is a getter that returns the streamConfig property of the class.