updateMuteStatus method

Future<void> updateMuteStatus()

Implementation

Future<void> updateMuteStatus() async {
  final micShouldBeMuted = (localUserMediaStream != null &&
          localUserMediaStream!.isAudioMuted()) ||
      remoteOnHold;
  final vidShouldBeMuted = (localUserMediaStream != null &&
          localUserMediaStream!.isVideoMuted()) ||
      remoteOnHold;

  _setTracksEnabled(localUserMediaStream?.stream?.getAudioTracks() ?? [],
      !micShouldBeMuted);
  _setTracksEnabled(localUserMediaStream?.stream?.getVideoTracks() ?? [],
      !vidShouldBeMuted);

  await sendSDPStreamMetadataChanged(
      room, callId, localPartyId, _getLocalSDPStreamMetadata());
}