Skip to content

Commit 6c7eae1

Browse files
committed
(fix) handle micFailed error
1 parent 8ef2ad1 commit 6c7eae1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ChatWindow/Room/Room.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,7 @@ export default {
405405
isRecording: false,
406406
bitRate: 128,
407407
sampleRate: 44100,
408-
format: 'mp3',
409-
micFailed: null,
410-
beforeRecording: null,
411-
pauseRecording: null,
412-
afterRecording: null
408+
format: 'mp3'
413409
}
414410
},
415411
@@ -844,15 +840,19 @@ export default {
844840
this.isRecording = false
845841
846842
return new Recorder({
847-
beforeRecording: this.beforeRecording,
848-
afterRecording: this.afterRecording,
849-
pauseRecording: this.pauseRecording,
843+
beforeRecording: null,
844+
afterRecording: null,
845+
pauseRecording: null,
850846
micFailed: this.micFailed,
851847
bitRate: this.bitRate,
852848
sampleRate: this.sampleRate,
853849
format: this.format
854850
})
855851
},
852+
micFailed() {
853+
this.isRecording = false
854+
this.recorder = this.initRecorder()
855+
},
856856
toggleRecorder(recording) {
857857
this.isRecording = recording
858858

0 commit comments

Comments
 (0)