mute method

Future<bool> mute()

Mutes this LocalTrack. This will stop the sending of track data and notify the RemoteParticipant with TrackMutedEvent. Returns true if muted, false if unchanged.

Implementation

Future<bool> mute() async {
  logger.fine('LocalTrack.mute() muted: $muted');
  if (muted) return false; // already muted
  await disable();
  if (!lkPlatformIs(PlatformType.windows)) {
    await stop();
  }
  updateMuted(true, shouldSendSignal: true);
  return true;
}