fix(external-api) Fix start recording (#12227)

Check recording is enabled before start
This commit is contained in:
Robert Pintilii 2022-09-23 13:22:37 +03:00 committed by GitHub
parent fe0c804cc0
commit c06d456ae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -92,7 +92,7 @@ import {
import { getParticipantsPaneOpen, isForceMuted } from '../../react/features/participants-pane/functions';
import { startLocalVideoRecording, stopLocalVideoRecording } from '../../react/features/recording';
import { RECORDING_TYPES } from '../../react/features/recording/constants';
import { getActiveSession } from '../../react/features/recording/functions';
import { getActiveSession, supportsLocalRecording } from '../../react/features/recording/functions';
import { isScreenAudioSupported } from '../../react/features/screen-share';
import { startScreenShareFlow, startAudioScreenShareFlow } from '../../react/features/screen-share/actions';
import { toggleScreenshotCaptureSummary } from '../../react/features/screenshot-capture';
@ -591,12 +591,25 @@ function initCommands() {
}
if (mode === 'local') {
APP.store.dispatch(startLocalVideoRecording(onlySelf));
const { localRecording } = state['features/base/config'];
if (!localRecording?.disable && supportsLocalRecording()) {
APP.store.dispatch(startLocalVideoRecording(onlySelf));
} else {
logger.error('Failed starting recording: local recording is either disabled or not supported');
}
return;
}
let recordingConfig;
const { recordingService } = state['features/base/config'];
if (!recordingService.enabled && !dropboxToken) {
logger.error('Failed starting recording: the recording service is not enabled');
return;
}
if (mode === JitsiRecordingConstants.mode.FILE) {
if (dropboxToken) {