temporary: log each stream request range, chasing the iOS 28-requests-per-song storm
This commit is contained in:
@@ -54,6 +54,13 @@ export async function streamAudioFile(
|
|||||||
}
|
}
|
||||||
if (!s.isFile()) return new Response('Not a file', { status: 404 });
|
if (!s.isFile()) return new Response('Not a file', { status: 404 });
|
||||||
|
|
||||||
|
// TEMPORARY diagnostic (2026-08-29): iOS first-play issues ~28 range requests in 2 s where Android
|
||||||
|
// issues one. This prints each request range so we can see WHICH bytes AVPlayer asks for — small
|
||||||
|
// sequential chunks would mean a transport problem, scattered offsets a VBR duration scan.
|
||||||
|
console.log(
|
||||||
|
`[stream] ${new Date().toISOString().slice(11, 23)} ${rangeHeader ?? "FULL"} · ${relPath.slice(relPath.lastIndexOf("/") + 1)}`,
|
||||||
|
);
|
||||||
|
|
||||||
const total = s.size;
|
const total = s.size;
|
||||||
const ext = absPath.slice(absPath.lastIndexOf('.') + 1).toLowerCase();
|
const ext = absPath.slice(absPath.lastIndexOf('.') + 1).toLowerCase();
|
||||||
const contentType = CONTENT_TYPES[ext] ?? 'application/octet-stream';
|
const contentType = CONTENT_TYPES[ext] ?? 'application/octet-stream';
|
||||||
|
|||||||
Reference in New Issue
Block a user