From 2de0636608607df1e2bee661789cb56eb2d52402 Mon Sep 17 00:00:00 2001 From: elpatron Date: Wed, 3 Jun 2026 18:56:32 +0200 Subject: [PATCH] fix: call load() to force mobile browsers to fetch blob URL metadata and fix player duration --- client/src/components/LiveVoiceCapture.tsx | 3 +++ client/src/components/VoiceMemoPlayer.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/components/LiveVoiceCapture.tsx b/client/src/components/LiveVoiceCapture.tsx index e40356b..1c3fadb 100644 --- a/client/src/components/LiveVoiceCapture.tsx +++ b/client/src/components/LiveVoiceCapture.tsx @@ -86,6 +86,9 @@ export default function LiveVoiceCapture({ el.addEventListener('loadedmetadata', handleLoadedMetadata) } + log('Calling el.load() to force loading of the media resource...') + el.load() + return () => { el.removeEventListener('loadedmetadata', handleLoadedMetadata) } diff --git a/client/src/components/VoiceMemoPlayer.tsx b/client/src/components/VoiceMemoPlayer.tsx index e3f249c..a104cf4 100644 --- a/client/src/components/VoiceMemoPlayer.tsx +++ b/client/src/components/VoiceMemoPlayer.tsx @@ -53,6 +53,10 @@ export default function VoiceMemoPlayer({ el.addEventListener('loadedmetadata', handleLoadedMetadata) } + if (src) { + el.load() + } + return () => { el.removeEventListener('loadedmetadata', handleLoadedMetadata) } @@ -103,7 +107,7 @@ export default function VoiceMemoPlayer({ return (
-
) }