spot: fixing audio capture

This commit is contained in:
nick-delirium 2024-10-25 15:20:18 +02:00
parent d733ab9b4f
commit 7416005370
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
6 changed files with 8173 additions and 5503 deletions

BIN
spot/.yarn/install-state.gz Normal file

Binary file not shown.

934
spot/.yarn/releases/yarn-4.5.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

3
spot/.yarnrc.yml Normal file
View file

@ -0,0 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.5.1.cjs

View file

@ -223,17 +223,17 @@ class ScreenRecorder {
console.error('get stream error:', e);
throw e;
}
// try {
// microphoneStream = await navigator.mediaDevices.getUserMedia({
// audio: { echoCancellation: false, deviceId: audioId },
// });
// this.audioTrack = microphoneStream.getAudioTracks()[0];
// if (!useMicrophone) {
// this.audioTrack.enabled = false;
// }
// } catch (e) {
// console.error('get audio error', e);
// }
try {
microphoneStream = await navigator.mediaDevices.getUserMedia({
audio: { echoCancellation: false, deviceId: audioId },
});
this.audioTrack = microphoneStream.getAudioTracks()[0];
if (!useMicrophone) {
this.audioTrack.enabled = false;
}
} catch (e) {
console.error('get audio error', e);
}
try {
this.audioTrack = this.createPlaceholderAudioTrack();
} catch (e) {

View file

@ -2,7 +2,7 @@
"name": "wxt-starter",
"description": "manifest.json description",
"private": true,
"version": "1.0.10",
"version": "1.0.11",
"type": "module",
"scripts": {
"dev": "wxt",
@ -32,6 +32,7 @@
"@wxt-dev/module-solid": "^1.1.2",
"daisyui": "^4.12.10",
"typescript": "^5.4.5",
"wxt": "0.19.10"
}
"wxt": "0.19.13"
},
"packageManager": "yarn@4.5.1"
}

File diff suppressed because it is too large Load diff