Add private S3 HLS playlist rewriting
This commit is contained in:
@@ -35,4 +35,15 @@ describe('post media response util', () => {
|
||||
expect(media.waveformPeaksPreview).toEqual([]);
|
||||
expect(media.waveformPeaksDetailed).toEqual([]);
|
||||
});
|
||||
|
||||
it('prefers rewritten HLS playback and keeps MP4 as fallback', () => {
|
||||
const media = buildPostMediaResponse({
|
||||
postType: PostType.VIDEO,
|
||||
hlsUrl: 'https://api.oudelaa.test/api/v1/media/hls/uploads/posts/hls/stream/master.m3u8',
|
||||
videoUrl: 'https://s3.cumin.dev/oudelaa/uploads/posts/video/video.mp4?X-Amz-Signature=signed',
|
||||
});
|
||||
|
||||
expect(media.preferredPlaybackUrl).toBe(media.hlsUrl);
|
||||
expect(media.videoUrl).toContain('X-Amz-Signature=signed');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user