From a7c1133c41e81df34f8210f2c85eb8c9c991aab7 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Mon, 29 Jan 2024 15:15:15 +0530 Subject: [PATCH] Remove download option from video player control list of shared link as download disabled --- apps/photos/src/components/PhotoFrame.tsx | 2 +- apps/photos/src/utils/photoFrame/index.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/photos/src/components/PhotoFrame.tsx b/apps/photos/src/components/PhotoFrame.tsx index 444477a4f..0097a1eba 100644 --- a/apps/photos/src/components/PhotoFrame.tsx +++ b/apps/photos/src/components/PhotoFrame.tsx @@ -212,7 +212,7 @@ const PhotoFrame = ({ throw Error(CustomError.FILE_CONVERSION_FAILED); } - await updateFileSrcProps(file, srcURLs); + await updateFileSrcProps(file, srcURLs, enableDownload); }; const handleClose = (needUpdate) => { diff --git a/apps/photos/src/utils/photoFrame/index.ts b/apps/photos/src/utils/photoFrame/index.ts index e3141a7fe..57144f523 100644 --- a/apps/photos/src/utils/photoFrame/index.ts +++ b/apps/photos/src/utils/photoFrame/index.ts @@ -69,7 +69,11 @@ export function updateFileMsrcProps(file: EnteFile, url: string) { } } -export async function updateFileSrcProps(file: EnteFile, srcURLs: SourceURLs) { +export async function updateFileSrcProps( + file: EnteFile, + srcURLs: SourceURLs, + enableDownload: boolean +) { const { url, isRenderable, isOriginal } = srcURLs; file.w = window.innerWidth; file.h = window.innerHeight; @@ -87,7 +91,9 @@ export async function updateFileSrcProps(file: EnteFile, srcURLs: SourceURLs) { if (file.metadata.fileType === FILE_TYPE.VIDEO) { file.html = ` -