onUserVideoStateChanged method
void
onUserVideoStateChanged()
Implementation
void onUserVideoStateChanged(String userId, TUIVideoStreamType streamType, bool hasVideo, TUIChangeReason reason) {
if (hasVideo) {
userState.hasVideoStreamUserList.value.add(userId);
} else {
userState.hasVideoStreamUserList.value.remove(userId);
}
final LinkedHashSet<String> tempList = LinkedHashSet<String>();
tempList.addAll(userState.hasVideoStreamUserList.value);
userState.hasVideoStreamUserList.value = tempList;
if (userId == userState.selfInfo.userId) {
mediaState.isCameraOpened.value = hasVideo;
}
}