Enable video playback on more browsers and fix video loading issues

Integrates HLS.js for wider browser support and fixes video playback by using iframe.

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/tKnLVTM
This commit is contained in:
sebastjanartic
2025-08-04 18:38:31 +00:00
parent b77e18915f
commit e087324c76
4 changed files with 113 additions and 17 deletions
+5 -6
View File
@@ -52,13 +52,12 @@ export class BunnyService {
}
private bunnyVideoToVideo(bunnyVideo: BunnyVideo): Video {
// Generate thumbnail URL from Bunny CDN
const thumbnailUrl = bunnyVideo.thumbnailFileName
? `https://${this.hostname}/${bunnyVideo.guid}/${bunnyVideo.thumbnailFileName}`
: `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg`;
// For private videos, use iframe embed or proxy approach
// Generate thumbnail URL from CDN (thumbnails are usually public)
const thumbnailUrl = `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg`;
// Generate video URL for streaming
const videoUrl = `https://${this.hostname}/${bunnyVideo.guid}/playlist.m3u8`;
// For private videos, we'll use an iframe embed URL which handles authentication
const videoUrl = `https://iframe.mediadelivery.net/embed/${this.libraryId}/${bunnyVideo.guid}`;
return {
id: bunnyVideo.guid,