Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-02-22 12:09:41 +0300
committerGitHub <noreply@github.com>2021-02-22 12:09:41 +0300
commit603c8f2b3ba4daeff02a5845fb9f51b08f6de851 (patch)
tree397c97da7b100435f57518f69de5eac181625fef
parenta141933144fc49b99386b895cb4fbbbe699c27a0 (diff)
parent3643e6fe184d05a7a66de26bf898a8095e1db41d (diff)
Merge pull request #5237 from nextcloud/revert-5104-backport/5103/stable21
Revert "[stable21] Split reporting of candidates by protocol"
-rw-r--r--src/components/AdminSettings/TurnServer.vue40
1 files changed, 13 insertions, 27 deletions
diff --git a/src/components/AdminSettings/TurnServer.vue b/src/components/AdminSettings/TurnServer.vue
index 357f7a5a0..916fbfa52 100644
--- a/src/components/AdminSettings/TurnServer.vue
+++ b/src/components/AdminSettings/TurnServer.vue
@@ -133,8 +133,7 @@ export default {
data() {
return {
testing: false,
- testingErrorUDP: false,
- testingErrorTCP: false,
+ testingError: false,
testingSuccess: false,
}
},
@@ -154,23 +153,17 @@ export default {
},
testIconClasses() {
return {
- 'icon-category-monitoring': !this.testing && !(this.testingErrorUDP || this.testingErrorTCP) && !this.testingSuccess,
+ 'icon-category-monitoring': !this.testing && !this.testingError && !this.testingSuccess,
'icon-loading-small': this.testing,
- 'icon-error': this.testingErrorUDP || this.testingErrorTCP,
+ 'icon-error': this.testingError,
'icon-checkmark': this.testingSuccess,
}
},
testResult() {
if (this.testingSuccess) {
return t('spreed', 'OK: Successful ICE candidates returned by the TURN server')
- } else if (this.testingErrorUDP) {
- if (this.testingErrorTCP) {
- return t('spreed', 'Error: No working ICE candidates returned by the TURN server')
- }
-
- return t('spreed', 'Error: No working ICE candidates returned for UDP by the TURN server')
- } else if (this.testingErrorTCP) {
- return t('spreed', 'Error: No working ICE candidates returned for TCP by the TURN server')
+ } else if (this.testingError) {
+ return t('spreed', 'Error: No working ICE candidates returned by the TURN server')
} else if (this.testing) {
return t('spreed', 'Testing whether the TURN server returns ICE candidates')
}
@@ -180,8 +173,7 @@ export default {
mounted() {
this.testing = false
- this.testingErrorUDP = false
- this.testingErrorTCP = false
+ this.testingError = false
this.testingSuccess = false
},
@@ -192,8 +184,7 @@ export default {
testServer() {
this.testing = true
- this.testingErrorUDP = false
- this.testingErrorTCP = false
+ this.testingError = false
this.testingSuccess = false
const schemes = this.schemes.split(',')
@@ -265,22 +256,17 @@ export default {
notifyTurnResult(candidates, timeout) {
console.info('Received candidates', candidates)
- const udpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'UDP')
- const tcpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'TCP')
+ const types = candidates.map((cand) => cand.type)
this.testing = false
- if (udpCandidates.length === 0 && this.protocols.indexOf('udp') !== -1) {
- this.testingErrorUDP = true
+ if (types.indexOf('relay') === -1) {
+ this.testingError = true
+ } else {
+ this.testingSuccess = true
}
- if (tcpCandidates.length === 0 && this.protocols.indexOf('tcp') !== -1) {
- this.testingErrorTCP = true
- }
-
- this.testingSuccess = !(this.testingErrorUDP || this.testingErrorTCP)
setTimeout(() => {
- this.testingErrorUDP = false
- this.testingErrorTCP = false
+ this.testingError = false
this.testingSuccess = false
}, 30000)