From f3bfa827fd612f96277c5cf5caa6081484725c22 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 23 Jan 2023 15:11:43 +0100 Subject: Enforce device picker and show a warning there Signed-off-by: Joas Schilling --- src/components/DeviceChecker/DeviceChecker.vue | 24 +++++++++++++++++++++++- src/components/TopBar/CallButton.vue | 8 ++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/components/DeviceChecker/DeviceChecker.vue b/src/components/DeviceChecker/DeviceChecker.vue index 325cbb74f..b57af9b20 100644 --- a/src/components/DeviceChecker/DeviceChecker.vue +++ b/src/components/DeviceChecker/DeviceChecker.vue @@ -133,9 +133,19 @@ - {{ t('spreed', 'Always show this dialog before joining a call in this conversation.') }} + + + +

{{ t('spreed', 'The call is being recorded.') }}

+
+
@@ -185,6 +195,7 @@ import Blur from 'vue-material-design-icons/Blur.vue' import BlurOff from 'vue-material-design-icons/BlurOff.vue' import BellOff from 'vue-material-design-icons/BellOff.vue' import Bell from 'vue-material-design-icons/Bell.vue' +import { CALL } from '../../constants.js' import { localMediaModel } from '../../utils/webrtc/index.js' import CallButton from '../TopBar/CallButton.vue' import { subscribe, unsubscribe } from '@nextcloud/event-bus' @@ -194,7 +205,9 @@ import VolumeIndicator from '../VolumeIndicator/VolumeIndicator.vue' import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' import isInLobby from '../../mixins/isInLobby.js' +import { getCapabilities } from '@nextcloud/capabilities' export default { name: 'DeviceChecker', @@ -208,6 +221,7 @@ export default { MediaDevicesSelector, VideoBackground, NcAvatar, + NcNoteCard, Cog, Microphone, MicrophoneOff, @@ -300,9 +314,17 @@ export default { return this.conversation.hasCall || this.conversation.hasCallOverwrittenByChat }, + isRecording() { + return this.conversation.callRecording !== CALL.RECORDING.OFF + }, + showSilentCallOption() { return !(this.hasCall && !this.isInLobby) }, + + canRecordingTakePlace() { + return getCapabilities()?.spreed?.config?.call?.recording || false + }, }, watch: { diff --git a/src/components/TopBar/CallButton.vue b/src/components/TopBar/CallButton.vue index e6f44b5f1..87e7a4355 100644 --- a/src/components/TopBar/CallButton.vue +++ b/src/components/TopBar/CallButton.vue @@ -72,7 +72,7 @@