From 8417409cc690790746d3696225c0cf42e024b091 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 4 Aug 2025 19:02:51 +0000 Subject: [PATCH] Improve how private videos are played on the platform for better reliability Use iframe embed for private videos to handle authentication correctly in BunnyService. 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/BH7V9Na --- server/bunny.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/bunny.ts b/server/bunny.ts index 1fcad45..ea64ee4 100644 --- a/server/bunny.ts +++ b/server/bunny.ts @@ -55,15 +55,15 @@ export class BunnyService { // Use proxy endpoint for thumbnails to handle private access const thumbnailUrl = `/thumbnail/${bunnyVideo.guid}`; - // For private videos, use iframe embed which properly handles private video authentication - const videoUrl = `https://iframe.mediadelivery.net/embed/${this.libraryId}/${bunnyVideo.guid}?controls=true&autoplay=false&preload=metadata`; + // For private videos, use iframe embed which properly handles authentication + const iframeUrl = `https://iframe.mediadelivery.net/embed/${this.libraryId}/${bunnyVideo.guid}?controls=true&autoplay=false`; return { id: bunnyVideo.guid, title: bunnyVideo.title || 'Untitled Video', description: null, // Bunny API doesn't return description in list view thumbnailUrl, - videoUrl, + videoUrl: iframeUrl, // Use iframe for reliable playback duration: Math.floor(bunnyVideo.length || 0), views: bunnyVideo.views || 0, category: bunnyVideo.category || null,