updateSelfAudioState method

void updateSelfAudioState(
  1. bool hasAudio,
  2. TUIChangeReason reason
)

Implementation

void updateSelfAudioState(bool hasAudio, TUIChangeReason reason) {
  currentUser.hasAudioStream.value = hasAudio;
  if (reason == TUIChangeReason.changedByAdmin) {
    if (hasAudio) {
      makeToast(
          msg: RoomContentsTranslations.translate(
              'microphoneTurnedOnByHostToast'));
    } else if (!roomInfo.isMicrophoneDisableForAllUser) {
      makeToast(
          msg: RoomContentsTranslations.translate(
              'microphoneTurnedOffByHostToast'));
    }
  }
  updateItemTouchableState();
}