switchSpeakers method

Future<void> switchSpeakers()

Switch speakers (rotate between speakerphone and other outputs)

Implementation

Future<void> switchSpeakers() async {
  // For mobile, we commonly toggle between speaker and earpiece/headset
  _isSpeakerPhoneOn = !_isSpeakerPhoneOn;
  await adapter.setSpeakerphoneOn(_isSpeakerPhoneOn);

  // TODO: For Web/Desktop, iterate through audiooutput devices
}