fix(RemoteVideo): broken grey avatar
Also moves the logic about participant connection status from SmallVideo to RemoteVideo, because it doesn't make sense for local videos.
This commit is contained in:
parent
12d7e61362
commit
6865b03338
|
@ -544,13 +544,24 @@ RemoteVideo.prototype.isConnectionActive = function() {
|
||||||
/**
|
/**
|
||||||
* The remote video is considered "playable" once the stream has started
|
* The remote video is considered "playable" once the stream has started
|
||||||
* according to the {@link #hasVideoStarted} result.
|
* according to the {@link #hasVideoStarted} result.
|
||||||
|
* It will be allowed to display video also in
|
||||||
|
* {@link ParticipantConnectionStatus.INTERRUPTED} if the video was ever played
|
||||||
|
* and was not muted while not in ACTIVE state. This basically means that there
|
||||||
|
* is stalled video image cached that could be displayed. It's used to show
|
||||||
|
* "grey video image" in user's thumbnail when there are connectivity issues.
|
||||||
*
|
*
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
RemoteVideo.prototype.isVideoPlayable = function () {
|
RemoteVideo.prototype.isVideoPlayable = function () {
|
||||||
|
const connectionState
|
||||||
|
= APP.conference.getParticipantConnectionStatus(this.id);
|
||||||
|
|
||||||
return SmallVideo.prototype.isVideoPlayable.call(this)
|
return SmallVideo.prototype.isVideoPlayable.call(this)
|
||||||
&& this.hasVideoStarted() && !this.mutedWhileDisconnected;
|
&& this.hasVideoStarted()
|
||||||
|
&& (connectionState === ParticipantConnectionStatus.ACTIVE
|
||||||
|
|| (connectionState === ParticipantConnectionStatus.INTERRUPTED
|
||||||
|
&& !this.mutedWhileDisconnected));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,8 +6,6 @@ import UIUtil from "../util/UIUtil";
|
||||||
import UIEvents from "../../../service/UI/UIEvents";
|
import UIEvents from "../../../service/UI/UIEvents";
|
||||||
import AudioLevels from "../audio_levels/AudioLevels";
|
import AudioLevels from "../audio_levels/AudioLevels";
|
||||||
|
|
||||||
const ParticipantConnectionStatus
|
|
||||||
= JitsiMeetJS.constants.participantConnectionStatus;
|
|
||||||
const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
|
const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -446,13 +444,8 @@ SmallVideo.prototype.isCurrentlyOnLargeVideo = function () {
|
||||||
* or <tt>false</tt> otherwise.
|
* or <tt>false</tt> otherwise.
|
||||||
*/
|
*/
|
||||||
SmallVideo.prototype.isVideoPlayable = function() {
|
SmallVideo.prototype.isVideoPlayable = function() {
|
||||||
const connectionState
|
|
||||||
= APP.conference.getParticipantConnectionStatus(this.id);
|
|
||||||
|
|
||||||
return this.videoStream // Is there anything to display ?
|
return this.videoStream // Is there anything to display ?
|
||||||
&& !this.isVideoMuted && !this.videoStream.isMuted() // Muted ?
|
&& !this.isVideoMuted && !this.videoStream.isMuted(); // Muted ?
|
||||||
&& (this.isLocal
|
|
||||||
|| connectionState === ParticipantConnectionStatus.ACTIVE);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue