Skip to content

armgit / ente

Public Imported from GitHub
0

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

add runOnWeb config option to getPlayableVideo

Abhinav043f5e27f27a
diff --git a/apps/photos/src/utils/file/index.ts b/apps/photos/src/utils/file/index.ts
index 750d7de15c..646d14948c 100644
--- a/apps/photos/src/utils/file/index.ts
+++ b/apps/photos/src/utils/file/index.ts
@@ -376,7 +376,8 @@ async function getRenderableLivePhotoURL(
const convertedVideoBlob = await getPlayableVideo(
livePhoto.videoNameTitle,
videoBlob,
- forceConvert
+ forceConvert,
+ true
);
return URL.createObjectURL(convertedVideoBlob);
} catch (e) {
@@ -394,7 +395,8 @@ async function getRenderableLivePhotoURL(
export async function getPlayableVideo(
videoNameTitle: string,
videoBlob: Blob,
- forceConvert = false
+ forceConvert = false,
+ runOnWeb = false
) {
try {
const isPlayable = await isPlaybackPossible(
@@ -403,7 +405,7 @@ export async function getPlayableVideo(
if (isPlayable && !forceConvert) {
return videoBlob;
} else {
- if (!forceConvert && !isElectron()) {
+ if (!forceConvert && !runOnWeb && !isElectron()) {
return null;
}
addLogLine(