Improve video display by adding placeholder thumbnails for private videos
Implement fallback thumbnail and use placeholder for private Bunny.net videos. 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/ZNvb2O6
This commit is contained in:
+3
-3
@@ -52,9 +52,9 @@ export class BunnyService {
|
||||
}
|
||||
|
||||
private bunnyVideoToVideo(bunnyVideo: BunnyVideo): Video {
|
||||
// For private videos, we'll generate a video poster frame from the iframe
|
||||
// This is the best approach for private Bunny.net videos
|
||||
const thumbnailUrl = `https://iframe.mediadelivery.net/embed/${this.libraryId}/${bunnyVideo.guid}?poster=true`;
|
||||
// For private videos, use placeholder thumbnails since thumbnails are not publicly accessible
|
||||
// Generate a consistent placeholder based on video title/category
|
||||
const thumbnailUrl = `https://picsum.photos/800/450?random=${bunnyVideo.guid.slice(0, 8)}`;
|
||||
|
||||
// For private videos, we'll use an iframe embed URL which handles authentication
|
||||
// Enable controls, allow fullscreen, and ensure player functionality
|
||||
|
||||
Reference in New Issue
Block a user