web,small-video: don't show screen content on thumbnails
This applies just to large view, not tile view.
This commit is contained in:
parent
fdffb688c1
commit
493ce8249e
|
@ -373,6 +373,7 @@ export default class RemoteVideo extends SmallVideo {
|
||||||
|
|
||||||
if (stream === this.videoStream) {
|
if (stream === this.videoStream) {
|
||||||
this.videoStream = null;
|
this.videoStream = null;
|
||||||
|
this.videoType = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateView();
|
this.updateView();
|
||||||
|
@ -481,7 +482,12 @@ export default class RemoteVideo extends SmallVideo {
|
||||||
|
|
||||||
const isVideo = stream.isVideoTrack();
|
const isVideo = stream.isVideoTrack();
|
||||||
|
|
||||||
isVideo ? this.videoStream = stream : this.audioStream = stream;
|
if (isVideo) {
|
||||||
|
this.videoStream = stream;
|
||||||
|
this.videoType = stream.videoType;
|
||||||
|
} else {
|
||||||
|
this.audioStream = stream;
|
||||||
|
}
|
||||||
|
|
||||||
if (!stream.getOriginalStream()) {
|
if (!stream.getOriginalStream()) {
|
||||||
logger.debug('Remote video stream has no original stream');
|
logger.debug('Remote video stream has no original stream');
|
||||||
|
|
|
@ -88,6 +88,7 @@ export default class SmallVideo {
|
||||||
this.audioStream = null;
|
this.audioStream = null;
|
||||||
this.VideoLayout = VideoLayout;
|
this.VideoLayout = VideoLayout;
|
||||||
this.videoIsHovered = false;
|
this.videoIsHovered = false;
|
||||||
|
this.videoType = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current state of the user's bridge connection. The value should be
|
* The current state of the user's bridge connection. The value should be
|
||||||
|
@ -243,6 +244,7 @@ export default class SmallVideo {
|
||||||
*/
|
*/
|
||||||
setScreenSharing(isScreenSharing) {
|
setScreenSharing(isScreenSharing) {
|
||||||
this.isScreenSharing = isScreenSharing;
|
this.isScreenSharing = isScreenSharing;
|
||||||
|
this.updateView();
|
||||||
this.updateStatusBar();
|
this.updateStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,8 +465,10 @@ export default class SmallVideo {
|
||||||
* or <tt>DISPLAY_BLACKNESS_WITH_NAME</tt>.
|
* or <tt>DISPLAY_BLACKNESS_WITH_NAME</tt>.
|
||||||
*/
|
*/
|
||||||
selectDisplayMode(input) {
|
selectDisplayMode(input) {
|
||||||
// Display name is always and only displayed when user is on the stage
|
if (!input.tileViewActive && input.isScreenSharing) {
|
||||||
if (input.isCurrentlyOnLargeVideo && !input.tileViewActive) {
|
return input.isHovered ? DISPLAY_AVATAR_WITH_NAME : DISPLAY_AVATAR;
|
||||||
|
} else if (input.isCurrentlyOnLargeVideo && !input.tileViewActive) {
|
||||||
|
// Display name is always and only displayed when user is on the stage
|
||||||
return input.isVideoPlayable && !input.isAudioOnly ? DISPLAY_BLACKNESS_WITH_NAME : DISPLAY_AVATAR_WITH_NAME;
|
return input.isVideoPlayable && !input.isAudioOnly ? DISPLAY_BLACKNESS_WITH_NAME : DISPLAY_AVATAR_WITH_NAME;
|
||||||
} else if (input.isVideoPlayable && input.hasVideo && !input.isAudioOnly) {
|
} else if (input.isVideoPlayable && input.hasVideo && !input.isAudioOnly) {
|
||||||
// check hovering and change state to video with name
|
// check hovering and change state to video with name
|
||||||
|
@ -493,6 +497,7 @@ export default class SmallVideo {
|
||||||
canPlayEventReceived: this._canPlayEventReceived,
|
canPlayEventReceived: this._canPlayEventReceived,
|
||||||
videoStream: Boolean(this.videoStream),
|
videoStream: Boolean(this.videoStream),
|
||||||
isVideoMuted: this.isVideoMuted,
|
isVideoMuted: this.isVideoMuted,
|
||||||
|
isScreenSharing: this.isScreenSharing,
|
||||||
videoStreamMuted: this.videoStream ? this.videoStream.isMuted() : 'no stream'
|
videoStreamMuted: this.videoStream ? this.videoStream.isMuted() : 'no stream'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,10 +177,7 @@ const VideoLayout = {
|
||||||
this.onAudioMute(id, stream.isMuted());
|
this.onAudioMute(id, stream.isMuted());
|
||||||
} else {
|
} else {
|
||||||
this.onVideoMute(id, stream.isMuted());
|
this.onVideoMute(id, stream.isMuted());
|
||||||
|
remoteVideo.setScreenSharing(stream.videoType === 'desktop');
|
||||||
if (stream.videoType === 'desktop') {
|
|
||||||
remoteVideo.setScreenSharing(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -192,10 +189,7 @@ const VideoLayout = {
|
||||||
|
|
||||||
if (remoteVideo) {
|
if (remoteVideo) {
|
||||||
remoteVideo.removeRemoteStreamElement(stream);
|
remoteVideo.removeRemoteStreamElement(stream);
|
||||||
|
remoteVideo.setScreenSharing(false);
|
||||||
if (stream.videoType === 'desktop') {
|
|
||||||
remoteVideo.setScreenSharing(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateMutedForNoTracks(id, stream.getType());
|
this.updateMutedForNoTracks(id, stream.getType());
|
||||||
|
@ -493,13 +487,14 @@ const VideoLayout = {
|
||||||
},
|
},
|
||||||
|
|
||||||
onVideoTypeChanged(id, newVideoType) {
|
onVideoTypeChanged(id, newVideoType) {
|
||||||
if (VideoLayout.getRemoteVideoType(id) === newVideoType) {
|
const remoteVideo = remoteVideos[id];
|
||||||
|
|
||||||
|
if (!remoteVideo || remoteVideo.videoType === newVideoType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info('Peer video type changed: ', id, newVideoType);
|
logger.info('Peer video type changed: ', id, newVideoType);
|
||||||
|
remoteVideo.setScreenSharing(newVideoType === 'desktop');
|
||||||
this._updateLargeVideoIfDisplayed(id, true);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue