Added mic not allowed error
This commit is contained in:
parent
47c43ea428
commit
8515a85649
1 changed files with 8 additions and 0 deletions
|
@ -316,6 +316,14 @@ namespace audio {
|
||||||
}, stream => resolve(stream), error => reject(error));
|
}, stream => resolve(stream), error => reject(error));
|
||||||
});
|
});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error instanceof DOMException) {
|
||||||
|
if(error.code == 0 || error.name == "NotAllowedError") {
|
||||||
|
console.warn(tr("Browser does not allow mirophone access"));
|
||||||
|
this._state = InputState.PAUSED;
|
||||||
|
createErrorModal(tr("Failed to create microphone"), tr("Microphone recording failed. Please allow TeaWeb access to your microphone")).open();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
console.warn(tr("Failed to initialize recording stream (%o)"), error);
|
console.warn(tr("Failed to initialize recording stream (%o)"), error);
|
||||||
throw tr("record stream initialisation failed");
|
throw tr("record stream initialisation failed");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue