updateSelfVideoState method
void
updateSelfVideoState(
- bool hasVideo,
- TUIChangeReason reason, {
- bool? isScreenStream,
})
Implementation
void updateSelfVideoState(bool hasVideo, TUIChangeReason reason,
{bool? isScreenStream}) {
if (isScreenStream == true) {
currentUser.hasScreenStream.value = hasVideo;
} else {
currentUser.hasVideoStream.value = hasVideo;
}
updateItemTouchableState();
if (reason != TUIChangeReason.changedByAdmin) {
return;
}
if (currentUser.hasVideoStream.value) {
makeToast(
msg: RoomContentsTranslations.translate('cameraTurnedOnByHostToast'));
} else if (!roomInfo.isCameraDisableForAllUser) {
if (isRoomNeedTakeSeat() && !currentUser.isOnSeat.value) {
return;
}
makeToast(
msg:
RoomContentsTranslations.translate('cameraTurnedOffByHostToast'));
}
}