Commit 82b10b2c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Properly close the camera when changing parameters.

The trick of calling the onclose callback wasn't correct.
parent 6388f16e
...@@ -1327,9 +1327,10 @@ async function addLocalMedia(localId) { ...@@ -1327,9 +1327,10 @@ async function addLocalMedia(localId) {
} }
let old = serverConnection.findByLocalId(localId); let old = serverConnection.findByLocalId(localId);
if(old && old.onclose) { if(old) {
// make sure that the camera is released before we try to reopen it // make sure that the camera is released before we try to reopen it
old.onclose.call(old, true); removeFilter(old);
stopStream(old.stream);
} }
let constraints = {audio: audio, video: video}; let constraints = {audio: audio, video: video};
......
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