From 6e9c11744cae52182acf334d7fd75453f7ce2862 Mon Sep 17 00:00:00 2001 From: ajaysi Date: Wed, 22 Apr 2026 06:10:15 +0530 Subject: [PATCH] fix: WebM/Opus audio duration shows zero - add durationchange listener and preload=auto --- .../components/VoiceAvatarPlaceholder.tsx | 8 +++++--- .../src/components/PodcastMaker/InlineAudioPlayer.tsx | 11 +++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/OnboardingWizard/PersonalizationStep/components/VoiceAvatarPlaceholder.tsx b/frontend/src/components/OnboardingWizard/PersonalizationStep/components/VoiceAvatarPlaceholder.tsx index c1471841..ff09cc9a 100644 --- a/frontend/src/components/OnboardingWizard/PersonalizationStep/components/VoiceAvatarPlaceholder.tsx +++ b/frontend/src/components/OnboardingWizard/PersonalizationStep/components/VoiceAvatarPlaceholder.tsx @@ -383,7 +383,7 @@ export const VoiceAvatarPlaceholder: React.FC<{ domainName?: string; onVoiceSet? } setAudioFile(file); const url = URL.createObjectURL(blob); - console.log('[VoiceClone] Created audio preview URL:', url, 'size:', file.size, 'type:', blob.type); + if (process.env.NODE_ENV === 'development') console.log('[VoiceClone] Created audio preview URL:', url.split('?')[0], 'size:', file.size, 'type:', blob.type); setAudioPreviewUrl(url); } catch (err) { console.error('[VoiceClone] Error creating audio blob:', err); @@ -813,7 +813,8 @@ export const VoiceAvatarPlaceholder: React.FC<{ domainName?: string; onVoiceSet?