setSpeakerOn method

Future<void> setSpeakerOn(
  1. bool speakerOn
)

Implementation

Future<void> setSpeakerOn(bool speakerOn) async {
  if (lkPlatformIs(PlatformType.iOS) || lkPlatformIs(PlatformType.android)) {
    await Hardware.instance.setSpeakerphoneOn(speakerOn);
    engine.roomOptions = engine.roomOptions.copyWith(
      defaultAudioOutputOptions:
          roomOptions.defaultAudioOutputOptions.copyWith(
        speakerOn: speakerOn,
      ),
    );
  }
}