From 58eff84f43539c979c5005ce1dbd8e5445a999ed Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Mon, 29 Dec 2025 11:00:46 -0800 Subject: [PATCH] Fix TypeScript lint errors in AudioViewer and VideoViewer - Change from data.buffer to new Uint8Array(data) to fix ArrayBufferLike type compatibility with Blob constructor - Fixes TS2322 errors about SharedArrayBuffer not being assignable to BlobPart --- src-web/components/responseViewers/AudioViewer.tsx | 2 +- src-web/components/responseViewers/VideoViewer.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-web/components/responseViewers/AudioViewer.tsx b/src-web/components/responseViewers/AudioViewer.tsx index a38c7d7a..145ff3fe 100644 --- a/src-web/components/responseViewers/AudioViewer.tsx +++ b/src-web/components/responseViewers/AudioViewer.tsx @@ -13,7 +13,7 @@ export function AudioViewer({ bodyPath, data }: Props) { if (bodyPath) { setSrc(convertFileSrc(bodyPath)); } else if (data) { - const blob = new Blob([data], { type: 'audio/mpeg' }); + const blob = new Blob([new Uint8Array(data)], { type: 'audio/mpeg' }); const url = URL.createObjectURL(blob); setSrc(url); return () => URL.revokeObjectURL(url); diff --git a/src-web/components/responseViewers/VideoViewer.tsx b/src-web/components/responseViewers/VideoViewer.tsx index 0bad1975..681a45b8 100644 --- a/src-web/components/responseViewers/VideoViewer.tsx +++ b/src-web/components/responseViewers/VideoViewer.tsx @@ -13,7 +13,7 @@ export function VideoViewer({ bodyPath, data }: Props) { if (bodyPath) { setSrc(convertFileSrc(bodyPath)); } else if (data) { - const blob = new Blob([data], { type: 'video/mp4' }); + const blob = new Blob([new Uint8Array(data)], { type: 'video/mp4' }); const url = URL.createObjectURL(blob); setSrc(url); return () => URL.revokeObjectURL(url);