fix(auto-thumbnail): [PKG-AUTO-THUMB-12] release stalled metadata loads

This commit is contained in:
Harvey Zhao committed 2026-09-15 12:31:32 +08:00
1 parent d3aa4bbfe4
commit 42ddead0cd
20 files changed
+6048 -20

No files matched your search

+6
View File
@@ -181,6 +181,12 @@ const server = http.createServer((req, res) => {
res.writeHead(503, { 'Content-Type': 'text/plain', 'Cache-Control': 'no-store' }).end('Intentional media failure')
return
}
if (url.pathname === '/test/pending-thumbnail-metadata.mp4') {
// Native media backends may bypass browser request interception. Keep this
// real HTTP response pending, with a server-side bound if a test fails.
res.setTimeout(10000, () => res.destroy())
return
}
if (files.has(url.pathname)) {
if (url.pathname === '/test/vast-skippable.xml' && ['http://imasdk.googleapis.com', 'https://imasdk.googleapis.com'].includes(req.headers.origin)) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin)