mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
Add audio tab and ability to change audio input device
This commit is contained in:
committed by
Paul Makles
parent
716a700a9e
commit
99cc7fdcd2
@@ -152,8 +152,10 @@ class VoiceStateReference {
|
||||
if (navigator.mediaDevices === undefined)
|
||||
return console.log("No media devices."); // ! TODO: let the user know
|
||||
|
||||
const mediaDevice = window.localStorage.getItem("audioInputDevice");
|
||||
|
||||
const mediaStream = await navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
audio: mediaDevice?{deviceId: mediaDevice}:true
|
||||
});
|
||||
|
||||
await this.client?.startProduce(
|
||||
|
||||
Reference in New Issue
Block a user