diff --git a/react/features/large-video/actions.web.ts b/react/features/large-video/actions.web.ts index 45120fcc264b..8a36cc568c26 100644 --- a/react/features/large-video/actions.web.ts +++ b/react/features/large-video/actions.web.ts @@ -1,8 +1,8 @@ // @ts-expect-error import VideoLayout from '../../../modules/UI/videolayout/VideoLayout'; import { IStore } from '../app/types'; -import { MEDIA_TYPE } from '../base/media/constants'; -import { getTrackByMediaTypeAndParticipant } from '../base/tracks/functions.web'; +import { getParticipantById } from '../base/participants/functions'; +import { getVideoTrackByParticipant } from '../base/tracks/functions.web'; import { SET_SEE_WHAT_IS_BEING_SHARED } from './actionTypes'; @@ -19,11 +19,12 @@ export function captureLargeVideoScreenshot() { const largeVideo = state['features/large-video']; const promise = Promise.resolve(); - if (!largeVideo) { + if (!largeVideo?.participantId) { return promise; } - const tracks = state['features/base/tracks']; - const participantTrack = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, largeVideo.participantId); + + const participant = getParticipantById(state, largeVideo.participantId); + const participantTrack = getVideoTrackByParticipant(state, participant); // Participants that join the call video muted do not have a jitsiTrack attached. if (!participantTrack?.jitsiTrack) {