This commit is contained in:
yumoqing 2025-09-29 10:38:05 +08:00
parent c8f26ec8e8
commit 575c5dc3b2

View File

@ -128,7 +128,9 @@ bricks.Camera = class extends bricks.Popup {
}
videorecorder_stop(){
return new Promise((resolve) => {
console.log('go here!')
this.mediaRecorder.onstop = () => {
console.log('stoped');
const blob = new Blob(this.recordedChunks, { type: 'video/webm' });
const url = URL.createObjectURL(blob);
resolve({ blob, url });