Skip to content

Commit

Permalink
Update hello.html
Browse files Browse the repository at this point in the history
  • Loading branch information
abraae authored Jun 29, 2024
1 parent c21ae9f commit 2ada922
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hello.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@

stopRecordingButton.onclick = () => {
recorder.stopRecording(() => {
// Combine all recorded blobs into one
let superBuffer = new Blob(recordedBlobs, { type: 'video/webm' });
let url = URL.createObjectURL(superBuffer);
// Combine only the last four recorded blobs
let lastFourBlobs = recordedBlobs.slice(-4);
let combinedBlobs = new Blob(lastFourBlobs, { type: 'video/webm' });
let url = URL.createObjectURL(combinedBlobs);

downloadLink.href = url;
downloadLink.download = 'recorded-video.webm';
Expand Down

0 comments on commit 2ada922

Please sign in to comment.