fix: use correct original URL for 360 video panorama playback (#26831)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
luis15pt
2026-03-12 20:27:44 +00:00
committed by GitHub
parent f3b7cd6198
commit c91d8745b4
2 changed files with 29 additions and 1 deletions
+26
View File
@@ -74,6 +74,32 @@ describe('utils', () => {
expect(url).toContain(asset.id);
});
it('should return original URL for video assets with forceOriginal', () => {
const asset = assetFactory.build({
originalPath: 'video.mp4',
originalMimeType: 'video/mp4',
type: AssetTypeEnum.Video,
});
const url = getAssetUrl({ asset, forceOriginal: true });
expect(url).toContain('/original');
expect(url).toContain(asset.id);
});
it('should return thumbnail URL for video assets without forceOriginal', () => {
const asset = assetFactory.build({
originalPath: 'video.mp4',
originalMimeType: 'video/mp4',
type: AssetTypeEnum.Video,
});
const url = getAssetUrl({ asset });
expect(url).toContain('/thumbnail');
expect(url).toContain(asset.id);
});
it('should return thumbnail URL for static images in shared link even with download and showMetadata permissions', () => {
const asset = assetFactory.build({
originalPath: 'image.gif',