Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix handling of conversion failure

Abhinav4b5d66baf3ed
diff --git a/apps/photos/src/components/PhotoFrame.tsx b/apps/photos/src/components/PhotoFrame.tsx
index 1522b03547..cb48209fa2 100644
--- a/apps/photos/src/components/PhotoFrame.tsx
+++ b/apps/photos/src/components/PhotoFrame.tsx
@@ -559,13 +559,14 @@ const PhotoFrame = ({
} else {
originalVideoURL = srcURL.original.split(',')[1];
}
- const convertedVideoURL = URL.createObjectURL(
- await getPlayableVideo(
- item.metadata.title,
- await (await fetch(originalVideoURL)).blob(),
- true
- )
+ const playableVideo = await getPlayableVideo(
+ item.metadata.title,
+ await (await fetch(originalVideoURL)).blob(),
+ true
);
+ const convertedVideoURL = playableVideo
+ ? URL.createObjectURL(playableVideo)
+ : '';
if (item.metadata.fileType === FILE_TYPE.VIDEO) {
srcURL.converted = convertedVideoURL;
} else {