From 144c3e17f52f2b9c41a4694b4b61646f8e1e4460 Mon Sep 17 00:00:00 2001 From: Michael Hollister Date: Mon, 21 Jul 2025 09:13:40 -0500 Subject: [PATCH] webOS: Revert packet endianess workaround since webpack uses correct nodejs version --- receivers/common/web/FCastSession.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/receivers/common/web/FCastSession.ts b/receivers/common/web/FCastSession.ts index b2a8d4b..541e6ff 100644 --- a/receivers/common/web/FCastSession.ts +++ b/receivers/common/web/FCastSession.ts @@ -61,31 +61,7 @@ export class FCastSession { const size = 1 + data.length; const header = Buffer.alloc(4 + 1); - - // webOS 22 and earlier node versions do not support `writeUint32LE`, - // so manually checking endianness and writing as LE - // @ts-ignore - if (TARGET === 'webOS') { - let uInt32 = new Uint32Array([0x11223344]); - let uInt8 = new Uint8Array(uInt32.buffer); - - if(uInt8[0] === 0x44) { - // LE - header[0] = size & 0xFF; - header[1] = size & 0xFF00; - header[2] = size & 0xFF0000; - header[3] = size & 0xFF000000; - } else if (uInt8[0] === 0x11) { - // BE - header[0] = size & 0xFF000000; - header[1] = size & 0xFF0000; - header[2] = size & 0xFF00; - header[3] = size & 0xFF; - } - } else { - header.writeUint32LE(size, 0); - } - + header.writeUint32LE(size, 0); header[4] = opcode; let packet: Buffer;