From 39789dc89acf8a56da0443a29067350f645cc554 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 8 Sep 2020 03:05:25 +0200 Subject: [PATCH] Make addSharedMedia go through newUpStream. Otherwise the callbacks don't get set. --- static/sfu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/sfu.js b/static/sfu.js index 48cf6e0..dd910b6 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -307,7 +307,7 @@ async function setMediaChoices() { } /** - * @param {string} id + * @param {string} [id] */ function newUpStream(id) { let c = serverConnection.newUpStream(id); @@ -420,7 +420,7 @@ async function addShareMedia(setup) { return; } - let c = await serverConnection.newUpStream(); + let c = newUpStream(); c.kind = 'screenshare'; c.stream = stream; stream.getTracks().forEach(t => {