Ensure video thumbnails are always up-to-date
Update thumbnail generation to include a cache-busting timestamp to resolve issues with stale thumbnails being displayed. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/QCN70f2
This commit is contained in:
+4
-2
@@ -73,9 +73,11 @@ export class BunnyService {
|
||||
|
||||
private bunnyVideoToVideo(bunnyVideo: BunnyVideo | BunnyVideoDetails): Video {
|
||||
// Generate optimized thumbnail URL from Bunny CDN with WebP format for better performance
|
||||
// Add cache busting timestamp to ensure fresh thumbnails
|
||||
const timestamp = Date.now();
|
||||
const thumbnailUrl = bunnyVideo.thumbnailFileName
|
||||
? `https://${this.hostname}/${bunnyVideo.guid}/${bunnyVideo.thumbnailFileName}?width=400&height=225&format=webp`
|
||||
: `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg?width=400&height=225&format=webp`;
|
||||
? `https://${this.hostname}/${bunnyVideo.guid}/${bunnyVideo.thumbnailFileName}?width=400&height=225&format=webp&t=${timestamp}`
|
||||
: `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg?width=400&height=225&format=webp&t=${timestamp}`;
|
||||
|
||||
// Generate signed HLS URL for private video access
|
||||
const hlsUrl = this.generateSignedUrl(bunnyVideo.guid);
|
||||
|
||||
Reference in New Issue
Block a user