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);