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
This commit is contained in:
parent
1d85507429
commit
8417409cc6
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user