fix after rebase

This commit is contained in:
Pawel Domas 2022-01-06 17:22:29 -06:00
parent aadb5ada8c
commit e79ae56676
2 changed files with 7 additions and 4 deletions

View File

@ -17,8 +17,8 @@ import { connect } from '../../../base/redux';
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants'; import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
import { isTestModeEnabled } from '../../../base/testing'; import { isTestModeEnabled } from '../../../base/testing';
import { import {
getLocalAudioTrack, getLocalAudioTrack, getLocalCameraTrack, getLocalScreenTrack,
getLocalVideoTrack, getLocalVideoTrack, getParticipantsCameraTrack, getParticipantsScreenTrack,
getTrackByMediaTypeAndParticipant, getTrackByMediaTypeAndParticipant,
updateLastTrackVideoMediaEvent updateLastTrackVideoMediaEvent
} from '../../../base/tracks'; } from '../../../base/tracks';
@ -903,8 +903,9 @@ function _mapStateToProps(state, ownProps): Object {
const id = participant?.id; const id = participant?.id;
const isLocal = participant?.local ?? true; const isLocal = participant?.local ?? true;
const tracks = state['features/base/tracks']; const tracks = state['features/base/tracks'];
const _videoTrack = isLocal const _cameraTrack = isLocal ? getLocalCameraTrack(tracks) : getParticipantsCameraTrack(tracks, participantID);
? getLocalVideoTrack(tracks) : getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, participantID); const _screenTrack = isLocal ? getLocalScreenTrack(tracks) : getParticipantsScreenTrack(tracks, participantID);
const _videoTrack = _cameraTrack || _screenTrack;
const _audioTrack = isLocal const _audioTrack = isLocal
? getLocalAudioTrack(tracks) : getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, participantID); ? getLocalAudioTrack(tracks) : getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, participantID);
const _currentLayout = getCurrentLayout(state); const _currentLayout = getCurrentLayout(state);

View File

@ -329,6 +329,7 @@ export function computeDisplayModeFromInput(input: Object) {
export function getDisplayModeInput(props: Object, state: Object) { export function getDisplayModeInput(props: Object, state: Object) {
const { const {
_currentLayout, _currentLayout,
_hasOnlyScreenStream,
_isAudioOnly, _isAudioOnly,
_isCurrentlyOnLargeVideo, _isCurrentlyOnLargeVideo,
_isScreenSharing, _isScreenSharing,
@ -349,6 +350,7 @@ export function getDisplayModeInput(props: Object, state: Object) {
videoStream: Boolean(_videoTrack), videoStream: Boolean(_videoTrack),
isRemoteParticipant: !_participant?.isFakeParticipant && !_participant?.local, isRemoteParticipant: !_participant?.isFakeParticipant && !_participant?.local,
isScreenSharing: _isScreenSharing, isScreenSharing: _isScreenSharing,
hasOnlyScreenStream: _hasOnlyScreenStream,
videoStreamMuted: _videoTrack ? _videoTrack.muted : 'no stream' videoStreamMuted: _videoTrack ? _videoTrack.muted : 'no stream'
}; };
} }