Adds config to auto turn on captions when recording is started.

This commit is contained in:
damencho 2019-08-30 14:41:18 +01:00 committed by Дамян Минков
parent 743bbcb846
commit 0c042b4078
4 changed files with 20 additions and 4 deletions

View File

@ -201,6 +201,9 @@ var config = {
// subtitles and buttons can be configured)
// transcribingEnabled: false,
// Enables automatic turning on captions when recording is started
// autoCaptionOnRecord: false,
// Misc
// Default value for the channel "last N" attribute. -1 for unlimited.

4
package-lock.json generated
View File

@ -10554,8 +10554,8 @@
}
},
"lib-jitsi-meet": {
"version": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
"from": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
"version": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
"from": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
"requires": {
"@jitsi/sdp-interop": "0.1.14",
"@jitsi/sdp-simulcast": "0.2.1",

View File

@ -55,7 +55,7 @@
"js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
"jsrsasign": "8.0.12",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
"lodash": "4.17.13",
"moment": "2.19.4",

View File

@ -12,9 +12,15 @@ import {
isEnabled as isDropboxEnabled
} from '../../../dropbox';
import { RECORDING_TYPES } from '../../constants';
import { toggleRequestingSubtitles } from '../../../subtitles';
type Props = {
/**
* Requests subtitles when recording is turned on.
*/
_autoCaptionOnRecord: boolean,
/**
* The {@code JitsiConference} for the current conference.
*/
@ -241,7 +247,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
* @returns {boolean} - True (to note that the modal should be closed).
*/
_onSubmit() {
const { _conference, _isDropboxEnabled, _token } = this.props;
const { _autoCaptionOnRecord, _conference, _isDropboxEnabled, _token, dispatch } = this.props;
let appData;
const attributes = {};
@ -276,6 +282,10 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
appData
});
if (_autoCaptionOnRecord) {
dispatch(toggleRequestingSubtitles());
}
return true;
}
@ -296,6 +306,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
* @private
* @returns {{
* _appKey: string,
* _autoCaptionOnRecord: boolean,
* _conference: JitsiConference,
* _fileRecordingsServiceEnabled: boolean,
* _fileRecordingsServiceSharingEnabled: boolean,
@ -305,6 +316,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
*/
export function mapStateToProps(state: Object) {
const {
autoCaptionOnRecord = false,
fileRecordingsServiceEnabled = false,
fileRecordingsServiceSharingEnabled = false,
dropbox = {}
@ -312,6 +324,7 @@ export function mapStateToProps(state: Object) {
return {
_appKey: dropbox.appKey,
_autoCaptionOnRecord: autoCaptionOnRecord,
_conference: state['features/base/conference'].conference,
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,