spot: fixing audio source select

This commit is contained in:
nick-delirium 2024-10-25 15:35:30 +02:00
parent 7416005370
commit a19c3ad0c3
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 2 additions and 6 deletions

View file

@ -354,7 +354,7 @@ export default defineBackground(() => {
type: "content:mount",
area: request.area,
mic: request.mic,
audioId: request.selectedAudioDevice,
audioId: request.audioId,
audioPerm: request.permissions ? (request.mic ? 2 : 1) : 0,
});
});

View file

@ -325,7 +325,7 @@ export default defineContentScript({
setInterval(() => {
void browser.runtime.sendMessage({ type: "ort:content-ready" });
}, 500)
}, 250)
// @ts-ignore false positive
browser.runtime.onMessage.addListener((message: any, resp) => {
if (message.type === "content:mount") {

View file

@ -233,11 +233,7 @@ class ScreenRecorder {
}
} catch (e) {
console.error('get audio error', e);
}
try {
this.audioTrack = this.createPlaceholderAudioTrack();
} catch (e) {
console.error('get audio error', e);
}
const existingAudioTracks = this.videoStream.getAudioTracks();