diff options
-rw-r--r-- | docs/Talkbuchet.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/Talkbuchet.js b/docs/Talkbuchet.js index 45642fc1f..01c07adf4 100644 --- a/docs/Talkbuchet.js +++ b/docs/Talkbuchet.js @@ -505,7 +505,13 @@ function listenToPublisherConnectionChanges() { async function initPublishers() { for (let i = 0; i < publishersCount; i++) { const signalingSettings = await getSignalingSettings(user, password, token) - const signaling = new Signaling(user, signalingSettings) + let signaling = null + try { + signaling = new Signaling(user, signalingSettings) + } catch (exception) { + console.error('Publisher ' + i + ' init error: ' + exception) + continue + } const [publisherSessionId, publisher] = await newPublisher(signalingSettings, signaling, stream) @@ -553,7 +559,13 @@ async function initSubscribers() { // The same signaling session can be shared between subscribers to // different publishers. const signalingSettings = await getSignalingSettings(user, password, token) - const signaling = new Signaling(user, signalingSettings) + let signaling = null + try { + signaling = new Signaling(user, signalingSettings) + } catch (exception) { + console.error('Subscriber ' + i + ' init error: ' + exception) + continue + } await signaling.getSessionId() |