|
|
|
@ -31,6 +31,12 @@ type Props = { |
|
|
|
|
*/ |
|
|
|
|
_fileRecordingsServiceEnabled: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether to show the possibility to share file recording with other people (e.g. meeting participants), based on |
|
|
|
|
* the actual implementation on the backend. |
|
|
|
|
*/ |
|
|
|
|
_fileRecordingsServiceSharingEnabled: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* If true the dropbox integration is enabled, otherwise - disabled. |
|
|
|
|
*/ |
|
|
|
@ -69,6 +75,11 @@ type State = { |
|
|
|
|
*/ |
|
|
|
|
selectedRecordingService: ?string, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* True if the user requested the service to share the recording with others. |
|
|
|
|
*/ |
|
|
|
|
sharingEnabled: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Number of MiB of available space in user's Dropbox account. |
|
|
|
|
*/ |
|
|
|
@ -96,6 +107,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> { |
|
|
|
|
this._onSubmit = this._onSubmit.bind(this); |
|
|
|
|
this._onSelectedRecordingServiceChanged |
|
|
|
|
= this._onSelectedRecordingServiceChanged.bind(this); |
|
|
|
|
this._onSharingSettingChanged = this._onSharingSettingChanged.bind(this); |
|
|
|
|
|
|
|
|
|
let selectedRecordingService; |
|
|
|
|
|
|
|
|
@ -112,6 +124,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> { |
|
|
|
|
isTokenValid: false, |
|
|
|
|
isValidating: false, |
|
|
|
|
userName: undefined, |
|
|
|
|
sharingEnabled: true, |
|
|
|
|
spaceLeft: undefined, |
|
|
|
|
selectedRecordingService |
|
|
|
|
}; |
|
|
|
@ -154,6 +167,19 @@ class AbstractStartRecordingDialog extends Component<Props, State> { |
|
|
|
|
return this.props._isDropboxEnabled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onSharingSettingChanged: () => void; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Callback to handle sharing setting change from the dialog. |
|
|
|
|
* |
|
|
|
|
* @returns {void} |
|
|
|
|
*/ |
|
|
|
|
_onSharingSettingChanged() { |
|
|
|
|
this.setState({ |
|
|
|
|
sharingEnabled: !this.state.sharingEnabled |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onSelectedRecordingServiceChanged: (string) => void; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -233,6 +259,11 @@ class AbstractStartRecordingDialog extends Component<Props, State> { |
|
|
|
|
}); |
|
|
|
|
attributes.type = RECORDING_TYPES.DROPBOX; |
|
|
|
|
} else { |
|
|
|
|
appData = JSON.stringify({ |
|
|
|
|
'file_recording_metadata': { |
|
|
|
|
'share': this.state.sharingEnabled |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
attributes.type = RECORDING_TYPES.JITSI_REC_SERVICE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -266,12 +297,16 @@ class AbstractStartRecordingDialog extends Component<Props, State> { |
|
|
|
|
* @returns {{ |
|
|
|
|
* _appKey: string, |
|
|
|
|
* _conference: JitsiConference, |
|
|
|
|
* _fileRecordingsServiceEnabled: boolean, |
|
|
|
|
* _fileRecordingsServiceSharingEnabled: boolean, |
|
|
|
|
* _isDropboxEnabled: boolean, |
|
|
|
|
* _token: string |
|
|
|
|
* }} |
|
|
|
|
*/ |
|
|
|
|
export function mapStateToProps(state: Object) { |
|
|
|
|
const { |
|
|
|
|
fileRecordingsServiceEnabled = false, |
|
|
|
|
fileRecordingsServiceSharingEnabled = false, |
|
|
|
|
dropbox = {} |
|
|
|
|
} = state['features/base/config']; |
|
|
|
|
|
|
|
|
@ -279,6 +314,7 @@ export function mapStateToProps(state: Object) { |
|
|
|
|
_appKey: dropbox.appKey, |
|
|
|
|
_conference: state['features/base/conference'].conference, |
|
|
|
|
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled, |
|
|
|
|
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled, |
|
|
|
|
_isDropboxEnabled: isDropboxEnabled(state), |
|
|
|
|
_token: state['features/dropbox'].token |
|
|
|
|
}; |
|
|
|
|