Improve video playback by correcting source URLs

Update the video card component to use the correct properties for MP4 and HLS video sources, ensuring videos load and play as expected.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/P3O2FU7
This commit is contained in:
sebastjanartic 2025-08-29 10:06:41 +00:00
parent 7fd7127003
commit e0a01aa0b5

View File

@ -123,14 +123,15 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
preload="none"
onLoadStart={() => console.log('Preview loading for:', video.title)}
onError={(e) => console.log('Preview failed for:', video.title)}
onCanPlay={() => console.log('Preview ready for:', video.title)}
>
{/* Try MP4 source first for faster loading */}
{video.mp4Url && (
<source src={video.mp4Url} type="video/mp4" />
{video.videoUrlMp4 && (
<source src={video.videoUrlMp4} type="video/mp4" />
)}
{/* Fallback to HLS if MP4 fails */}
{video.hlsUrl && (
<source src={video.hlsUrl} type="application/x-mpegURL" />
{video.videoUrl && (
<source src={video.videoUrl} type="application/x-mpegURL" />
)}
</video>
</div>