ref(video-layout): video layout controls own updating after user leave
This commit is contained in:
committed by
virtuacoplenny
parent
ec0439cbb1
commit
1e3dc20b44
@@ -504,18 +504,6 @@ UI.addUser = function(user) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove user from UI.
|
||||
* @param {string} id user id
|
||||
* @param {string} displayName user nickname
|
||||
*/
|
||||
UI.removeUser = function(id, displayName) {
|
||||
messageHandler.participantNotification(
|
||||
displayName, 'notify.somebody', 'disconnected', 'notify.disconnected');
|
||||
|
||||
VideoLayout.removeParticipantContainer(id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Update videotype for specified user.
|
||||
* @param {string} id user id
|
||||
|
||||
@@ -497,7 +497,7 @@ export default class SharedVideoManager {
|
||||
this.localAudioMutedListener);
|
||||
this.localAudioMutedListener = null;
|
||||
|
||||
VideoLayout.removeParticipantContainer(this.url);
|
||||
APP.store.dispatch(participantLeft(this.url, APP.conference._room));
|
||||
|
||||
VideoLayout.showLargeVideoContainer(SHARED_VIDEO_CONTAINER_TYPE, false)
|
||||
.then(() => {
|
||||
@@ -522,8 +522,6 @@ export default class SharedVideoManager {
|
||||
UIEvents.UPDATE_SHARED_VIDEO, null, 'removed');
|
||||
});
|
||||
|
||||
APP.store.dispatch(participantLeft(this.url, APP.conference._room));
|
||||
|
||||
this.url = null;
|
||||
this.isSharedVideoShown = false;
|
||||
this.initialAttributes = null;
|
||||
|
||||
@@ -68,10 +68,6 @@ SharedVideoThumb.prototype.videoClick = function() {
|
||||
SharedVideoThumb.prototype.remove = function() {
|
||||
logger.log('Remove shared video thumb', this.id);
|
||||
|
||||
// Make sure that the large video is updated if are removing its
|
||||
// corresponding small video.
|
||||
this.VideoLayout.updateAfterThumbRemoved(this.id);
|
||||
|
||||
// Remove whole container
|
||||
if (this.container.parentNode) {
|
||||
this.container.parentNode.removeChild(this.container);
|
||||
|
||||
@@ -476,10 +476,6 @@ RemoteVideo.prototype.remove = function() {
|
||||
|
||||
this.removeRemoteVideoMenu();
|
||||
|
||||
// Make sure that the large video is updated if are removing its
|
||||
// corresponding small video.
|
||||
this.VideoLayout.updateAfterThumbRemoved(this.id);
|
||||
|
||||
// Remove whole container
|
||||
if (this.container.parentNode) {
|
||||
this.container.parentNode.removeChild(this.container);
|
||||
|
||||
@@ -253,7 +253,7 @@ const VideoLayout = {
|
||||
* Uses focusedID if any or dominantSpeakerID if any,
|
||||
* otherwise elects new video, in this order.
|
||||
*/
|
||||
updateAfterThumbRemoved(id) {
|
||||
_updateAfterThumbRemoved(id) {
|
||||
// Always trigger an update if large video is empty.
|
||||
if (!largeVideo
|
||||
|| (this.getLargeVideoID() && !this.isCurrentlyOnLarge(id))) {
|
||||
@@ -804,6 +804,7 @@ const VideoLayout = {
|
||||
}
|
||||
|
||||
VideoLayout.resizeThumbnails();
|
||||
VideoLayout._updateAfterThumbRemoved(id);
|
||||
},
|
||||
|
||||
onVideoTypeChanged(id, newVideoType) {
|
||||
|
||||
Reference in New Issue
Block a user