bunny.ts: generateSignedUrl now returns folxvideos CDN URL
This commit is contained in:
parent
b3e23877cf
commit
26de8896c5
@ -254,12 +254,7 @@ export class BunnyService {
|
|||||||
|
|
||||||
// Generate signed URL for private video access
|
// Generate signed URL for private video access
|
||||||
generateSignedUrl(videoId: string, expirationTime: number = 3600): string {
|
generateSignedUrl(videoId: string, expirationTime: number = 3600): string {
|
||||||
const baseUrl = `https://${this.hostname}/${videoId}/playlist.m3u8`;
|
// Switched to folxvideos.b-cdn.net (S3-folxspeed origin) - public, no token required
|
||||||
const expires = Math.floor(Date.now() / 1000) + expirationTime;
|
return `https://folxvideos.b-cdn.net/folx-tv/${videoId}/master.m3u8`;
|
||||||
|
|
||||||
// Simple token generation (in production, use proper HMAC signing)
|
|
||||||
const token = Buffer.from(`${videoId}:${expires}:${this.apiKey.substring(0, 8)}`).toString('base64');
|
|
||||||
|
|
||||||
return `${baseUrl}?token=${token}&expires=${expires}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user