|
@@ -100,7 +100,7 @@ import {
|
100
|
100
|
} from '../../react/features/participants-pane/actions';
|
101
|
101
|
import { getParticipantsPaneOpen, isForceMuted } from '../../react/features/participants-pane/functions';
|
102
|
102
|
import { startLocalVideoRecording, stopLocalVideoRecording } from '../../react/features/recording/actions.any';
|
103
|
|
-import { RECORDING_TYPES } from '../../react/features/recording/constants';
|
|
103
|
+import { RECORDING_METADATA_ID, RECORDING_TYPES } from '../../react/features/recording/constants';
|
104
|
104
|
import { getActiveSession, supportsLocalRecording } from '../../react/features/recording/functions';
|
105
|
105
|
import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/features/screen-share/actions';
|
106
|
106
|
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
|
|
@@ -629,6 +629,7 @@ function initCommands() {
|
629
|
629
|
* @param { string } arg.youtubeStreamKey - The youtube stream key.
|
630
|
630
|
* @param { string } arg.youtubeBroadcastID - The youtube broadcast ID.
|
631
|
631
|
* @param { Object } arg.extraMetadata - Any extra metadata params for file recording.
|
|
632
|
+ * @param { boolean } arg.transcription - Whether a transcription should be started or not.
|
632
|
633
|
* @returns {void}
|
633
|
634
|
*/
|
634
|
635
|
'start-recording': ({
|
|
@@ -640,7 +641,8 @@ function initCommands() {
|
640
|
641
|
rtmpBroadcastID,
|
641
|
642
|
youtubeStreamKey,
|
642
|
643
|
youtubeBroadcastID,
|
643
|
|
- extraMetadata = {}
|
|
644
|
+ extraMetadata = {},
|
|
645
|
+ transcription
|
644
|
646
|
}) => {
|
645
|
647
|
const state = APP.store.getState();
|
646
|
648
|
const conference = getCurrentConference(state);
|
|
@@ -715,25 +717,33 @@ function initCommands() {
|
715
|
717
|
mode: JitsiRecordingConstants.mode.STREAM,
|
716
|
718
|
streamId: youtubeStreamKey || rtmpStreamKey
|
717
|
719
|
};
|
718
|
|
- } else {
|
719
|
|
- logger.error('Invalid recording mode provided');
|
720
|
|
-
|
721
|
|
- return;
|
722
|
720
|
}
|
723
|
721
|
|
724
|
722
|
if (isScreenshotCaptureEnabled(state, true, false)) {
|
725
|
723
|
APP.store.dispatch(toggleScreenshotCaptureSummary(true));
|
726
|
724
|
}
|
727
|
|
- conference.startRecording(recordingConfig);
|
|
725
|
+
|
|
726
|
+ // Start audio / video recording, if requested.
|
|
727
|
+ if (typeof recordingConfig !== 'undefined') {
|
|
728
|
+ conference.startRecording(recordingConfig);
|
|
729
|
+ }
|
|
730
|
+
|
|
731
|
+ if (transcription) {
|
|
732
|
+ APP.store.dispatch(setRequestingSubtitles(true, false, null));
|
|
733
|
+ conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
|
|
734
|
+ isTranscribingEnabled: true
|
|
735
|
+ });
|
|
736
|
+ }
|
728
|
737
|
},
|
729
|
738
|
|
730
|
739
|
/**
|
731
|
740
|
* Stops a recording or streaming in progress.
|
732
|
741
|
*
|
733
|
742
|
* @param {string} mode - `local`, `file` or `stream`.
|
|
743
|
+ * @param {boolean} transcription - Whether the transcription needs to be stopped.
|
734
|
744
|
* @returns {void}
|
735
|
745
|
*/
|
736
|
|
- 'stop-recording': mode => {
|
|
746
|
+ 'stop-recording': (mode, transcription) => {
|
737
|
747
|
const state = APP.store.getState();
|
738
|
748
|
const conference = getCurrentConference(state);
|
739
|
749
|
|
|
@@ -743,6 +753,13 @@ function initCommands() {
|
743
|
753
|
return;
|
744
|
754
|
}
|
745
|
755
|
|
|
756
|
+ if (transcription) {
|
|
757
|
+ APP.store.dispatch(setRequestingSubtitles(false, false, null));
|
|
758
|
+ conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
|
|
759
|
+ isTranscribingEnabled: false
|
|
760
|
+ });
|
|
761
|
+ }
|
|
762
|
+
|
746
|
763
|
if (mode === 'local') {
|
747
|
764
|
APP.store.dispatch(stopLocalVideoRecording());
|
748
|
765
|
|