Commit 2380e2e1 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

The up streams rework broke renegotiation. Don't attempt to

renegotiate, just close the stream and open it again.
parent e623442b
...@@ -1013,12 +1013,11 @@ async function addLocalMedia(id) { ...@@ -1013,12 +1013,11 @@ async function addLocalMedia(id) {
} }
let old = id && serverConnection.up[id]; let old = id && serverConnection.up[id];
if(old)
old.close();
if(!audio && !video) { if(!audio && !video)
if(old)
old.close();
return; return;
}
let constraints = {audio: audio, video: video}; let constraints = {audio: audio, video: video};
/** @type {MediaStream} */ /** @type {MediaStream} */
...@@ -1027,8 +1026,6 @@ async function addLocalMedia(id) { ...@@ -1027,8 +1026,6 @@ async function addLocalMedia(id) {
stream = await navigator.mediaDevices.getUserMedia(constraints); stream = await navigator.mediaDevices.getUserMedia(constraints);
} catch(e) { } catch(e) {
displayError(e); displayError(e);
if(old)
old.close();
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment