|
@@ -86,7 +86,6 @@ export function isVideoPlayable(stateful: Object | Function, id: String) {
|
86
|
86
|
const state = toState(stateful);
|
87
|
87
|
const tracks = state['features/base/tracks'];
|
88
|
88
|
const participant = id ? getParticipantById(state, id) : getLocalParticipant(state);
|
89
|
|
- let isVideoMuted = true;
|
90
|
89
|
const isLocal = participant?.local ?? true;
|
91
|
90
|
const { connectionStatus } = participant || {};
|
92
|
91
|
const videoTrack
|
|
@@ -94,11 +93,13 @@ export function isVideoPlayable(stateful: Object | Function, id: String) {
|
94
|
93
|
const isAudioOnly = Boolean(state['features/base/audio-only'].enabled);
|
95
|
94
|
let isPlayable = false;
|
96
|
95
|
|
97
|
|
- if (participant?.local) {
|
98
|
|
- isVideoMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO);
|
|
96
|
+ if (isLocal) {
|
|
97
|
+ const isVideoMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO);
|
|
98
|
+
|
99
|
99
|
isPlayable = Boolean(videoTrack) && !isVideoMuted && !isAudioOnly;
|
100
|
100
|
} else if (!participant?.isFakeParticipant) { // remote participants excluding shared video
|
101
|
|
- isVideoMuted = isRemoteTrackMuted(tracks, MEDIA_TYPE.VIDEO, id);
|
|
101
|
+ const isVideoMuted = isRemoteTrackMuted(tracks, MEDIA_TYPE.VIDEO, id);
|
|
102
|
+
|
102
|
103
|
isPlayable = Boolean(videoTrack) && !isVideoMuted && !isAudioOnly
|
103
|
104
|
&& connectionStatus === JitsiParticipantConnectionStatus.ACTIVE;
|
104
|
105
|
}
|