refactor: stop recording triggers file download instead of browser storage

Recording flow: click Stop → frames packed into .mjpeg blob → browser
download triggered immediately. No more IndexedDB or OPFS.

Playback: use 'Load Recording File' button to open a .mjpeg file.
Removed all storage dependencies — pure file-based, 100% reliable.
This commit is contained in:
2026-08-01 18:59:32 +08:00
parent 36413bbf60
commit d2ecb1a4ed
10 changed files with 119 additions and 359 deletions
+2 -27
View File
@@ -35,16 +35,10 @@ const emit = defineEmits<{
v-if="state === 'recording'"
class="btn btn-stop"
@click="emit('stop')"
title="Stop and save recording"
title="Stop and download recording"
>
<span class="btn-icon">⏹</span>
Stop &amp; Save
</button>
<!-- Saving -->
<button v-if="state === 'saving'" class="btn btn-saving" disabled>
<span class="spinner"></span>
Saving…
Stop &amp; Download
</button>
</div>
@@ -119,25 +113,6 @@ const emit = defineEmits<{
background: #c0392b;
}
.btn-saving {
background: #666;
color: #fff;
}
.spinner {
display: inline-block;
width: 14px;
height: 14px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.recording-info {
display: flex;
align-items: center;