forked from abner/for-legacy-web
Add audio tab and ability to change audio input device
This commit is contained in:
committed by
Paul Makles
parent
6842bdc4a5
commit
a6846192de
@@ -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