mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
비효율적인 비디오 스트리밍 로직 개선
This commit is contained in:
@@ -62,9 +62,7 @@ const streamFromServer = async (
|
||||
) => {
|
||||
const totalSize = getDecryptedSize(metadata.encContentSize, metadata.isLegacy);
|
||||
const start = range?.start ?? 0;
|
||||
const end =
|
||||
range?.end ??
|
||||
(range && !metadata.isLegacy ? Math.min(start + CHUNK_SIZE, totalSize) : totalSize) - 1;
|
||||
const end = range?.end ?? totalSize - 1;
|
||||
if (start > end || start < 0 || end >= totalSize) {
|
||||
return new Response("Invalid range", { status: 416 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user