setInputMute method

Future<void> setInputMute({
  1. String? inputName,
  2. String? inputUuid,
  3. required bool inputMuted,
})

Sets the audio mute state of an input.

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

Implementation

Future<void> setInputMute({
  String? inputName,
  String? inputUuid,
  required bool inputMuted,
}) async {
  if (inputName == null && inputUuid == null) {
    throw ArgumentError('inputName or inputUuid must be provided');
  }

  await obsWebSocket.sendRequest(
    Request(
      'SetInputMute',
      requestData: {
        'inputName': inputName,
        'inputUuid': inputUuid,
        'inputMuted': inputMuted,
      },
    ),
  );
}