Merge branch 'main' into cast
This commit is contained in:
commit
0435fbc47c
2 changed files with 9 additions and 3 deletions
|
@ -212,7 +212,7 @@ const PhotoFrame = ({
|
|||
throw Error(CustomError.FILE_CONVERSION_FAILED);
|
||||
}
|
||||
|
||||
await updateFileSrcProps(file, srcURLs);
|
||||
await updateFileSrcProps(file, srcURLs, enableDownload);
|
||||
};
|
||||
|
||||
const handleClose = (needUpdate) => {
|
||||
|
|
|
@ -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 = `
|
||||
<video controls onContextMenu="return false;">
|
||||
<video controls ${
|
||||
!enableDownload && 'controlsList="nodownload"'
|
||||
} onContextMenu="return false;">
|
||||
<source src="${url}" />
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
|
Loading…
Add table
Reference in a new issue