diff --git a/src/App.vue b/src/App.vue index 7430c5b86b6..9240d09e8a5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,7 +22,9 @@ import debounce from 'debounce' import { provide } from 'vue' import { getCurrentUser } from '@nextcloud/auth' +import { showWarning } from '@nextcloud/dialogs' import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus' +import { loadState } from '@nextcloud/initial-state' import { t } from '@nextcloud/l10n' import { generateUrl } from '@nextcloud/router' @@ -197,6 +199,7 @@ export default { EventBus.off('switch-to-conversation') EventBus.off('conversations-received') EventBus.off('forbidden-route') + EventBus.off('signaling-internal-show-warning', this.showSignalingInternalWarning) }, beforeMount() { @@ -333,6 +336,10 @@ export default { } }) + if (loadState('spreed', 'signaling_mode') === 'internal') { + EventBus.on('signaling-internal-show-warning', this.showSignalingInternalWarning) + } + const beforeRouteChangeListener = (to, from, next) => { if (this.isNextcloudTalkHashDirty) { // Nextcloud Talk configuration changed, reload the page when changing configuration @@ -615,7 +622,13 @@ export default { // Breakout to breakout return oldConversation.objectType === CONVERSATION.OBJECT_TYPE.BREAKOUT_ROOM && newConversation.objectType === CONVERSATION.OBJECT_TYPE.BREAKOUT_ROOM - } + }, + + showSignalingInternalWarning(token) { + if (this.$store.getters.isModerator || this.$store.getters.participantsList(token)?.length > 4) { + showWarning(t('spreed', 'Having a call with more than 4 participants without external signaling server can cause connectivity issues and cause high load on participating devices')) + } + }, }, } diff --git a/src/FilesSidebarTabApp.vue b/src/FilesSidebarTabApp.vue index 9865a361b68..53b4f49e20b 100644 --- a/src/FilesSidebarTabApp.vue +++ b/src/FilesSidebarTabApp.vue @@ -202,6 +202,7 @@ export default { // signaling server is used periodic polling has to be used // instead. OCA.Talk.fetchCurrentConversationIntervalId = window.setInterval(OCA.Talk.fetchCurrentConversationWrapper, 30000) + // TODO } }, diff --git a/src/PublicShareAuthSidebar.vue b/src/PublicShareAuthSidebar.vue index e0976aff082..a3b015bbeba 100644 --- a/src/PublicShareAuthSidebar.vue +++ b/src/PublicShareAuthSidebar.vue @@ -156,6 +156,7 @@ export default { // signaling server is used periodic polling has to be used // instead. this.fetchCurrentConversationIntervalId = window.setInterval(this.fetchCurrentConversation, 30000) + // TODO } if (currentUser || guestNickname) { diff --git a/src/PublicShareSidebar.vue b/src/PublicShareSidebar.vue index 42124922432..ffd7cd2776e 100644 --- a/src/PublicShareSidebar.vue +++ b/src/PublicShareSidebar.vue @@ -197,6 +197,7 @@ export default { // signaling server is used periodic polling has to be used // instead. this.fetchCurrentConversationIntervalId = window.setInterval(this.fetchCurrentConversation, 30000) + // TODO } }, diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 9f2bd012831..73d846cf686 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -579,6 +579,14 @@ Signaling.Internal.prototype.sendPendingMessages = function() { }.bind(this)) } +Signaling.Internal.prototype._joinCallSuccess = function(token) { + if (this.hideWarning) { + return + } + + EventBus.emit('signaling-internal-show-warning', token) +} + /** * @param {object} settings The signaling settings * @param {string|string[]} urls The url of the signaling server