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
path: root/docs
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-05-21 11:24:06 +0300
committerJoas Schilling <coding@schilljs.com>2021-06-14 12:33:12 +0300
commit9a6af81a52d1978da073330ff3839fcdb310d2d2 (patch)
treee7c926940264faa9126d5a47a8331aff1bd30b8b /docs
parent07cd488ce20b5da8b9a2df9e6a1b4c101d951bc1 (diff)
First define all things before starting to call functions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/Talkbuchet.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/Talkbuchet.js b/docs/Talkbuchet.js
index 5f1069b03..9fb9e7ba7 100644
--- a/docs/Talkbuchet.js
+++ b/docs/Talkbuchet.js
@@ -457,6 +457,7 @@ stream = await navigator.mediaDevices.getUserMedia({
})
publishers = []
+subscribers = []
function listenToPublisherConnectionChanges() {
Object.values(publishers).forEach(publisher => {
@@ -504,10 +505,6 @@ async function initPublishers() {
listenToPublisherConnectionChanges()
}
-await initPublishers()
-
-subscribers = []
-
function listenToSubscriberConnectionChanges() {
subscribers.forEach(subscriber => {
subscriber.peerConnection.addEventListener('iceconnectionstatechange', event => {
@@ -578,4 +575,5 @@ const closeConnections = function() {
console.info('Preparing to siege')
+await initPublishers()
await initSubscribers()