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:
parent
7fd7127003
commit
e0a01aa0b5
@ -123,14 +123,15 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
|
|||||||
preload="none"
|
preload="none"
|
||||||
onLoadStart={() => console.log('Preview loading for:', video.title)}
|
onLoadStart={() => console.log('Preview loading for:', video.title)}
|
||||||
onError={(e) => console.log('Preview failed 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 */}
|
{/* Try MP4 source first for faster loading */}
|
||||||
{video.mp4Url && (
|
{video.videoUrlMp4 && (
|
||||||
<source src={video.mp4Url} type="video/mp4" />
|
<source src={video.videoUrlMp4} type="video/mp4" />
|
||||||
)}
|
)}
|
||||||
{/* Fallback to HLS if MP4 fails */}
|
{/* Fallback to HLS if MP4 fails */}
|
||||||
{video.hlsUrl && (
|
{video.videoUrl && (
|
||||||
<source src={video.hlsUrl} type="application/x-mpegURL" />
|
<source src={video.videoUrl} type="application/x-mpegURL" />
|
||||||
)}
|
)}
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user