getInputSettings method

Future<InputSettingsResponse> getInputSettings({
  1. String? inputName,
  2. String? inputUuid,
})

Gets the settings of an input.

Note: Does not include defaults. To create the entire settings object, overlay inputSettings over the defaultInputSettings provided by GetInputDefaultSettings.

  • Complexity Rating: 3/5
  • Latest Supported RPC Version: 1
  • Added in v5.0.0

Implementation

Future<InputSettingsResponse> getInputSettings({
  String? inputName,
  String? inputUuid,
}) async {
  if (inputName == null && inputUuid == null) {
    throw ArgumentError('inputName or inputUuid must be provided');
  }

  final response = await obsWebSocket.sendRequest(Request(
    'GetInputSettings',
    requestData: {
      'inputName': inputName,
      'inputUuid': inputUuid,
    }..removeWhere((key, value) => value == null),
  ));

  return InputSettingsResponse.fromJson(response!.responseData!);
}