fix: use JPEG SOI/EOI marker scanning instead of multipart parsing

Recording now scans the fetch response for JPEG start-of-image (0xFFD8)
and end-of-image (0xFFD9) markers instead of parsing multipart boundaries.
This is more robust because:
- No dependency on boundary format quirks
- No crossOrigin attribute needed (no canvas tainting issues)
- JPEG SOI/EOI markers are reliable frame delimiters per the JPEG spec

Also added cancelRecording() cleanup at start of each new recording.
This commit is contained in:
2026-08-01 16:48:44 +08:00
parent 88caa1e976
commit 786230036b
3 changed files with 95 additions and 74 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MJPEG Stream Viewer</title>
<script type="module" crossorigin src="/assets/index-3GYuRNvV.js"></script>
<script type="module" crossorigin src="/assets/index-C5dzEsTl.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DuJPD2XK.css">
</head>
<body>