From 4d033ae75816283f68db3c4d2c7303a1bba49e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sun, 8 Mar 2026 14:27:46 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[sound-logo]=20Lyria=20WebSocket=20Blob?= =?UTF-8?q?=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=A5=BC=20=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EB=A1=9C=20=EB=B3=80=ED=99=98=20=ED=9B=84=20JSON=20?= =?UTF-8?q?=ED=8C=8C=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Blob 무시 대신 text()로 변환하여 JSON 파싱 시도 - Lyria API가 오디오 청크를 Blob 바이너리 프레임으로 전송하는 경우 대응 --- resources/views/rd/sound-logo/index.blade.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/views/rd/sound-logo/index.blade.php b/resources/views/rd/sound-logo/index.blade.php index ceca6417..3978bc79 100644 --- a/resources/views/rd/sound-logo/index.blade.php +++ b/resources/views/rd/sound-logo/index.blade.php @@ -1808,11 +1808,14 @@ function soundLogo() { })); }; - ws.onmessage = (event) => { - // 바이너리 Blob은 무시 (JSON 메시지만 처리) - if (event.data instanceof Blob) return; + ws.onmessage = async (event) => { + let raw = event.data; + // Blob이면 텍스트로 변환 + if (raw instanceof Blob) { + raw = await raw.text(); + } let msg; - try { msg = JSON.parse(event.data); } catch { return; } + try { msg = JSON.parse(raw); } catch { return; } // Setup 완료 if (msg.setupComplete) {