diff --git a/src/components/CallView/CallView.vue b/src/components/CallView/CallView.vue index feb4b1dfb34..09a3c674cd1 100644 --- a/src/components/CallView/CallView.vue +++ b/src/components/CallView/CallView.vue @@ -265,7 +265,19 @@ export default { return this.callViewStore.isViewerOverlay }, + forcedCallViewMode() { + return this.localCallParticipantModel.attributes.forcedCallViewMode + }, + isGrid() { + if (this.forcedCallViewMode === 'grid' && !this.$store.getters.isModerator) { + return true + } + + if (this.forcedCallViewMode === 'speaker' && !this.$store.getters.isModerator) { + return false + } + return this.callViewStore.isGrid && !this.isSidebar }, @@ -487,6 +499,7 @@ export default { mounted() { this.debounceFetchPeers = debounce(this.fetchPeers, 1500) EventBus.on('refresh-peer-list', this.debounceFetchPeers) + EventBus.on('force-call-view-mode', this.forceCallViewMode) callParticipantCollection.on('remove', this._lowerHandWhenParticipantLeaves) @@ -498,6 +511,7 @@ export default { this.debounceFetchPeers.clear?.() this.callViewStore.setIsEmptyCallView(true) EventBus.off('refresh-peer-list', this.debounceFetchPeers) + EventBus.off('force-call-view-mode', this.forceCallViewMode) callParticipantCollection.off('remove', this._lowerHandWhenParticipantLeaves) @@ -797,6 +811,10 @@ export default { } }, + forceCallViewMode(mode) { + this.localCallParticipantModel.forceCallViewMode(mode) + }, + }, } diff --git a/src/components/TopBar/CallModerationDialog.vue b/src/components/TopBar/CallModerationDialog.vue new file mode 100644 index 00000000000..39e5a7bed19 --- /dev/null +++ b/src/components/TopBar/CallModerationDialog.vue @@ -0,0 +1,104 @@ + + + + + {{ t('spreed', 'Moderate the call') }} + + + {{ t('spreed', 'Force the view mode for all participants') }} + + + + {{ t('spreed', 'Force Grid view') }} + + + {{ t('spreed', 'Force Speaker view') }} + + + {{ t('spreed', 'None') }} + + + + + + + + + diff --git a/src/components/TopBar/TopBarMenu.vue b/src/components/TopBar/TopBarMenu.vue index ebbc9ea67fa..34526f206ec 100644 --- a/src/components/TopBar/TopBarMenu.vue +++ b/src/components/TopBar/TopBarMenu.vue @@ -62,6 +62,7 @@ {{ changeViewText }} + + + + + {{ t('spreed', 'Moderate the call') }} + @@ -148,10 +157,13 @@ {{ t('spreed', 'Download attendance list') }} + +
+ {{ t('spreed', 'Force the view mode for all participants') }} +