Play videos directly instead of using an embedded player for better experience

Refactor video playback in VideoModal to use direct CDN URL and update bunny.ts to use directUrl for HLS streaming.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 50814a1e-92e4-4968-856f-7bc7eedf5e8f
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/50814a1e-92e4-4968-856f-7bc7eedf5e8f/Iu4fJAO
This commit is contained in:
sebastjanartic
2025-08-04 19:04:22 +00:00
parent 8417409cc6
commit 16cf7dd5a8
2 changed files with 20 additions and 25 deletions
+12 -23
View File
@@ -180,29 +180,18 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps)
</Button>
<div className="relative bg-black rounded-lg overflow-hidden">
{video.videoUrl.includes('iframe.mediadelivery.net') ? (
<iframe
src={video.videoUrl}
className="w-full h-auto max-h-[80vh] aspect-video"
allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture; fullscreen;"
allowFullScreen={true}
frameBorder="0"
onLoad={handleVideoPlay}
data-testid="video-iframe"
/>
) : (
<video
ref={videoRef}
className="w-full h-auto max-h-[80vh]"
controls
preload="metadata"
onPlay={handleVideoPlay}
data-testid="video-player"
crossOrigin="anonymous"
>
Your browser does not support the video tag.
</video>
)}
<video
ref={videoRef}
className="w-full h-auto max-h-[80vh] aspect-video"
controls
preload="metadata"
onPlay={handleVideoPlay}
data-testid="video-player"
crossOrigin="anonymous"
src={video.videoUrl}
>
Your browser does not support the video tag.
</video>
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-6">
<h3