Revert to original Bunny.net player for video playback
Reverts client-side video player to use Bunny.net's iframe embed and updates server storage to reflect the original Bunny.net iframe URLs instead of HLS stream URLs. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d7424866-83d1-4486-a212-ac12b4c7becf Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/d7424866-83d1-4486-a212-ac12b4c7becf/Biq0lDI
This commit is contained in:
parent
ece04e8891
commit
506bd52dc3
@ -254,19 +254,17 @@ export default function VideoPage() {
|
|||||||
<div className="flex flex-col lg:flex-row gap-6 relative z-10">
|
<div className="flex flex-col lg:flex-row gap-6 relative z-10">
|
||||||
{/* Main video section */}
|
{/* Main video section */}
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
{/* Video player using Video.js */}
|
{/* Video player using original Bunny.net iframe */}
|
||||||
<div className="relative w-full h-0 pb-[56.25%] bg-black rounded-lg overflow-hidden mb-4">
|
<div className="relative w-full h-0 pb-[56.25%] bg-black rounded-lg overflow-hidden mb-4">
|
||||||
<video
|
<iframe
|
||||||
controls
|
src={`https://iframe.mediadelivery.net/embed/384105/${currentVideo.id}?autoplay=false&preroll=false`}
|
||||||
className="absolute inset-0 w-full h-full"
|
className="absolute inset-0 w-full h-full"
|
||||||
onPlay={handleVideoPlay}
|
frameBorder="0"
|
||||||
preload="metadata"
|
allowFullScreen
|
||||||
data-testid="video-player"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
>
|
onLoad={handleVideoPlay}
|
||||||
<source src={`https://vz-b9208a4c-8c8.b-cdn.net/${currentVideo.id}/playlist.m3u8`} type="application/x-mpegURL" />
|
title={currentVideo.title}
|
||||||
<source src={`https://vz-b9208a4c-8c8.b-cdn.net/${currentVideo.id}/play_720p.mp4`} type="video/mp4" />
|
/>
|
||||||
Your browser does not support the video tag.
|
|
||||||
</video>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Video info */}
|
{/* Video info */}
|
||||||
|
|||||||
@ -73,13 +73,13 @@ export class DatabaseStorage implements IStorage {
|
|||||||
const result = await db.execute(sqlQuery);
|
const result = await db.execute(sqlQuery);
|
||||||
console.log(`📊 DatabaseStorage: Found ${result.rows.length} videos (search: "${search || 'none'}")`);
|
console.log(`📊 DatabaseStorage: Found ${result.rows.length} videos (search: "${search || 'none'}")`);
|
||||||
|
|
||||||
// Transform database rows to Video objects with HLS streaming URLs
|
// Transform database rows to Video objects with original Bunny iframe URLs
|
||||||
return result.rows.map((row: any) => ({
|
return result.rows.map((row: any) => ({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
title: row.title,
|
title: row.title,
|
||||||
description: row.description,
|
description: row.description,
|
||||||
thumbnailUrl: row.thumbnail_url,
|
thumbnailUrl: row.thumbnail_url,
|
||||||
videoUrl: `https://vz-b9208a4c-8c8.b-cdn.net/${row.id}/playlist.m3u8`, // HLS stream URL
|
videoUrl: `https://iframe.mediadelivery.net/embed/384105/${row.id}`, // Original Bunny iframe
|
||||||
duration: row.duration,
|
duration: row.duration,
|
||||||
views: row.views,
|
views: row.views,
|
||||||
category: row.category,
|
category: row.category,
|
||||||
@ -110,7 +110,7 @@ export class DatabaseStorage implements IStorage {
|
|||||||
title: row.title,
|
title: row.title,
|
||||||
description: row.description,
|
description: row.description,
|
||||||
thumbnailUrl: row.thumbnail_url,
|
thumbnailUrl: row.thumbnail_url,
|
||||||
videoUrl: `https://vz-b9208a4c-8c8.b-cdn.net/${row.id}/playlist.m3u8`, // HLS stream URL
|
videoUrl: `https://iframe.mediadelivery.net/embed/384105/${row.id}`, // Original Bunny iframe
|
||||||
duration: row.duration,
|
duration: row.duration,
|
||||||
views: row.views,
|
views: row.views,
|
||||||
category: row.category,
|
category: row.category,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user