mirror of
https://github.com/jech/galene.git
synced 2024-12-22 15:25:48 +01:00
Properly close the camera when changing parameters.
The trick of calling the onclose callback wasn't correct.
This commit is contained in:
parent
6388f16e87
commit
82b10b2c10
1 changed files with 3 additions and 2 deletions
|
@ -1327,9 +1327,10 @@ async function addLocalMedia(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
|
||||
old.onclose.call(old, true);
|
||||
removeFilter(old);
|
||||
stopStream(old.stream);
|
||||
}
|
||||
|
||||
let constraints = {audio: audio, video: video};
|
||||
|
|
Loading…
Reference in a new issue