mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix: use AudioContext for voice recording
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
4e008cc314
commit
b124a6796d
1 changed files with 9 additions and 1 deletions
|
|
@ -189,7 +189,15 @@ export default {
|
||||||
|
|
||||||
// Create a media recorder to capture the stream
|
// Create a media recorder to capture the stream
|
||||||
try {
|
try {
|
||||||
this.mediaRecorder = new this.MediaRecorder(this.audioStream, {
|
const audioContext = new AudioContext()
|
||||||
|
|
||||||
|
const mediaStreamAudioSourceNode = audioContext.createMediaStreamSource(this.audioStream)
|
||||||
|
const mediaStreamAudioDestinationNode = audioContext.createMediaStreamDestination()
|
||||||
|
|
||||||
|
mediaStreamAudioSourceNode
|
||||||
|
.connect(mediaStreamAudioDestinationNode) // playback audio on output device
|
||||||
|
|
||||||
|
this.mediaRecorder = new this.MediaRecorder(mediaStreamAudioDestinationNode.stream, {
|
||||||
mimeType: 'audio/wav',
|
mimeType: 'audio/wav',
|
||||||
})
|
})
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue