selectMicrophone method

  1. @override
Future<bool> selectMicrophone(
  1. String deviceId
)
override

Selects the microphone / audio input device with the given deviceId.

Implementation

@override
Future<bool> selectMicrophone(String deviceId) async {
  try {
    final success = await methodChannel
        .invokeMethod<bool>('selectMicrophone', {'deviceId': deviceId})
        .timeout(methodTimeout);
    return success ?? false;
  } catch (e, stack) {
    debugPrint('AudioPicker: selectMicrophone error: $e\n$stack');
    return false;
  }
}