最长录音3分钟

This commit is contained in:
kuaifan 2022-05-29 11:36:35 +08:00
parent 38b6a74e3d
commit 2dc5790a46

View File

@ -527,11 +527,15 @@ export default {
}
this.recordRec = window.Recorder({
type: "mp3",
bitRate: 16,
bitRate: 32,
sampleRate: 16000,
onProcess: (buffers, powerLevel, duration, sampleRate, newBufferIdx, asyncEnd) => {
this.recordWave.input(buffers[buffers.length - 1], powerLevel, sampleRate);
this.recordDuration = duration;
if (duration >= 3 * 60 * 1000) {
// 3
this.stopRecord(false);
}
}
})
if (window.Recorder.Support()) {