fix(screenshot-capture): send remote participant id instead of jid (#11132)
* fix(screenshot-capture): send remote participant id instead of jid * fix: lint errors
This commit is contained in:
parent
f6a79860f2
commit
4d2000a7a4
|
@ -16,7 +16,6 @@ import {
|
|||
POLL_INTERVAL,
|
||||
SET_INTERVAL
|
||||
} from './constants';
|
||||
import { getParticipantJid } from './functions';
|
||||
import { processScreenshot } from './processScreenshot';
|
||||
import { timerWorkerScript } from './worker';
|
||||
|
||||
|
@ -178,10 +177,7 @@ export default class ScreenshotCaptureSummary {
|
|||
const remoteParticipants = getRemoteParticipants(this._state);
|
||||
const participants = [];
|
||||
|
||||
remoteParticipants.forEach(p => participants.push(
|
||||
getParticipantJid(this._state, p.id)
|
||||
));
|
||||
|
||||
remoteParticipants.forEach(p => participants.push(p.id));
|
||||
this._storedImageData = imageData;
|
||||
|
||||
processScreenshot(this._currentCanvas, {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// @flow
|
||||
|
||||
import { getCurrentConference } from '../base/conference';
|
||||
import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
|
||||
import { toState } from '../base/redux';
|
||||
import { getActiveSession } from '../recording/functions';
|
||||
|
@ -23,29 +22,6 @@ export function createScreenshotCaptureSummary(stateful: Object | Function) {
|
|||
return new ScreenshotCaptureSummary(toState(stateful));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a participant's connection JID given its ID.
|
||||
*
|
||||
* @param {Object} state - The redux store state.
|
||||
* @param {string} participantId - ID of the given participant.
|
||||
* @returns {string|undefined} - The participant connection JID if found.
|
||||
*/
|
||||
export function getParticipantJid(state: Object, participantId: string) {
|
||||
const conference = getCurrentConference(state);
|
||||
|
||||
if (!conference) {
|
||||
return;
|
||||
}
|
||||
|
||||
const participant = conference.getParticipantById(participantId);
|
||||
|
||||
if (!participant) {
|
||||
return;
|
||||
}
|
||||
|
||||
return participant.getJid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the screenshot capture is enabled based on the config.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue