Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(external-api) extend captureLargeVideoScreenshot for screenshare (#14149)

Mihaela Dumitrud094ac00343b
diff --git a/react/features/large-video/actions.web.ts b/react/features/large-video/actions.web.ts
index 45120fcc26..8a36cc568c 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) {