enableSpeaker abstract method

Future<void> enableSpeaker(
  1. bool enable
)

Turn the speaker on or off.

Available since: 2.11.0 Description: When enable is true, turn on the speaker and play audio stream; when it is false, turn off the speaker and stop playing audio stream. Use case: The user turns on or off the speaker to communicate in the room. Default value: When this function is not called, the speaker is turned off by default. When to call: After initializing the range audio createRangeAudio and login room loginRoom. Caution: Turning on the speaker will automatically pull the audio stream in the room.

  • enable Whether to turn on the speaker.

Implementation

Future<void> enableSpeaker(bool enable);