ObsSettings Module
Required Permissions: slobs.obs-settings
The ObsSettings module can be used to change underlying OBS settings. These include but are not limited to things like:
- Stream key and streaming server
- Output video resolution and framerade
- Audio/Video encoder settings
The settings available via this API are extensive, and currently we only provide a very raw get/set interface on them. This documentation page describes at a high level how to use the API but does not go into detail about all of the settings available in the API. If there is something specific you need to change, please reach out to the Streamlabs Desktop dev team, and we can assist you with changing the settings you want to change.
getSettings method
method
getSettings(): Dictionary<Dictionary<any>>
This function fetches all settings.
Arguments
None
Returns
An object that maps settings category names to category objects. Category objects are a flat key-value object of available settings.
Example
streamlabsOBS.v1.ObsSettings.getSettings()
.then(settings => {
console.log('Settings', settings);
});
setSettings method
method
setSettings(patch: Partial<Settings>): void
Arguments
patch
: a partial settings object containing the settings you want to change
Returns
None
Example
// Changing the stream key
streamlabsOBS.v1.ObsSettings.setSettings({
Stream: {
key: 'example_stream_key'
}
});
Updated almost 3 years ago