mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +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
|
||||
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',
|
||||
})
|
||||
} catch (exception) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue