From e1c2e09c9ea6a4e750dfecbba027d36943608b50 Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Mon, 6 May 2024 01:47:25 +0700 Subject: [PATCH] If there are no range, request first 1MB --- src/app/api/stream/[encryptedId]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/stream/[encryptedId]/route.ts b/src/app/api/stream/[encryptedId]/route.ts index f0b1ba6..486f534 100644 --- a/src/app/api/stream/[encryptedId]/route.ts +++ b/src/app/api/stream/[encryptedId]/route.ts @@ -43,7 +43,7 @@ export async function GET( { headers: { "Accept-Ranges": "bytes", - "Range": request.headers.get("Range") || "bytes=0-", + "Range": request.headers.get("Range") || `bytes=0-${1024 * 1024 - 1}`, }, }, );