Skip to content

Commit

Permalink
fix(external-api) extend captureLargeVideoScreenshot for screenshare (j…
Browse files Browse the repository at this point in the history
  • Loading branch information
mihhu authored Dec 13, 2023
1 parent c6b7ec7 commit d094ac0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions react/features/large-video/actions.web.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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) {
Expand Down

0 comments on commit d094ac0

Please sign in to comment.