diff --git a/.replit b/.replit index 8090e93..10afe05 100644 --- a/.replit +++ b/.replit @@ -16,7 +16,7 @@ localPort = 5000 externalPort = 80 [[ports]] -localPort = 41645 +localPort = 43411 externalPort = 3000 [env] diff --git a/client/src/components/video-card.tsx b/client/src/components/video-card.tsx index f69cd41..768d808 100644 --- a/client/src/components/video-card.tsx +++ b/client/src/components/video-card.tsx @@ -77,7 +77,7 @@ export default function VideoCard({ video, onClick, className = "", hideOverlay }; }, []); - // Load mute preference on component mount + // Load mute preference on component mount - default to muted for previews useEffect(() => { const savedMuteState = localStorage.getItem('videoPreviewMuted'); const shouldBeMuted = savedMuteState === null ? true : savedMuteState === 'true'; @@ -264,7 +264,22 @@ export default function VideoCard({ video, onClick, className = "", hideOverlay } }} onTimeUpdate={(e) => setCurrentTime(e.currentTarget.currentTime)} - onLoadedMetadata={(e) => setDuration(e.currentTarget.duration)} + onLoadedMetadata={(e) => { + setDuration(e.currentTarget.duration); + const video = e.currentTarget; + // Check if video has audio using various browser methods + const hasAudio = + (video as any).mozHasAudio || + Boolean((video as any).webkitAudioDecodedByteCount) || + Boolean((video as any).audioTracks && (video as any).audioTracks.length) || + false; + console.log('🎵 Video metadata loaded:', { + hasAudio, + duration: video.duration, + muted: video.muted, + volume: video.volume + }); + }} onMouseMove={(e) => { if (!videoRef.current || duration === 0) return; const rect = e.currentTarget.getBoundingClientRect(); @@ -276,11 +291,12 @@ export default function VideoCard({ video, onClick, className = "", hideOverlay }} /> - {/* Mute/Unmute button - make it always visible and more prominent */} + {/* Mute/Unmute button - always visible and functional */}