From caa71615d136cbb5a718a3ba8e130da78ed6a892 Mon Sep 17 00:00:00 2001 From: zhaarey <157944548+zhaarey@users.noreply.github.com> Date: Sun, 2 Jun 2024 23:07:08 +0800 Subject: [PATCH] delete byteArrayToString --- agent.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/agent.js b/agent.js index e85f188..bc1759b 100644 --- a/agent.js +++ b/agent.js @@ -159,15 +159,7 @@ setTimeout(() => { async function handleM3U8Connection(s) { console.log("New M3U8 connection!"); - try { - const byteArrayToString = byteArray => { - let result = ''; - for (let i = 0; i < byteArray.length; ++i) { - result += String.fromCharCode(byteArray[i]); - } - return result; - }; - + try { const adamSize = (await s.input.readAll(1)).unwrap().readU8(); if (adamSize !== 0) { const adam = await s.input.readAll(adamSize);