updateUserVideoState method

void updateUserVideoState(
  1. String userId,
  2. bool hasVideo,
  3. TUIChangeReason reason,
  4. RxList<UserModel> destList, {
  5. bool? isScreenStream,
})

Implementation

void updateUserVideoState(String userId, bool hasVideo,
    TUIChangeReason reason, RxList<UserModel> destList,
    {bool? isScreenStream}) {
  var index = getUserIndex(userId, destList);
  if (index == -1) {
    return;
  }
  if (isScreenStream == true) {
    destList[index].hasScreenStream.value = hasVideo;
  } else {
    destList[index].hasVideoStream.value = hasVideo;
  }
}