Add a comment

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2023-07-10 16:51:33 +02:00
parent cc2808a1da
commit b814efc21f

View File

@@ -152,6 +152,11 @@ export function VideoPreview({ matrixInfo, onUserChoicesChanged }: Props) {
setInitializingAudio(false);
}
audioTrack?.getDeviceId().then((audioId) => {
// getDeviceId() can return undefined for audio devices. This happens if
// the devices list uses "default" as the device id for the current
// device and the device set on the track also uses the deviceId
// "default". Check `normalizeDeviceId` in `getDeviceId` for more
// details.
audioIn.setSelected(audioId ?? "default");
});
}