refac
This commit is contained in:
1 parent
c1202a2327
commit
8ffc3d746f
2 files changed
+3
-2
No files matched your search
@@ -238,7 +238,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mineTypes = ['audio/webm; codecs=opus', 'audio/mp4'];
|
const mineTypes = ['audio/webm; codecs=opus', 'audio/webm', 'audio/ogg; codecs=opus', 'audio/mp4', 'audio/wav'];
|
||||||
|
|
||||||
mediaRecorder = new MediaRecorder(stream, {
|
mediaRecorder = new MediaRecorder(stream, {
|
||||||
mimeType: mineTypes.find((type) => MediaRecorder.isTypeSupported(type))
|
mimeType: mineTypes.find((type) => MediaRecorder.isTypeSupported(type))
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ export class AudioQueue {
|
|||||||
#halt() {
|
#halt() {
|
||||||
this.audio.pause();
|
this.audio.pause();
|
||||||
this.audio.currentTime = 0;
|
this.audio.currentTime = 0;
|
||||||
this.audio.src = '';
|
this.audio.removeAttribute('src');
|
||||||
|
this.audio.load();
|
||||||
this.queue = [];
|
this.queue = [];
|
||||||
this.current = null;
|
this.current = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user