Introduce ability to play mp4 files as they download

This commit is contained in:
Scott Nonnenberg 2025-01-14 15:22:40 +10:00 committed by GitHub
parent bab1ceb831
commit 16bbcc2c50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1304 additions and 141 deletions

View file

@ -14,6 +14,7 @@ import {
getImageDimensions,
getThumbnailUrl,
getUrl,
isIncremental,
isVideoAttachment,
} from '../../types/Attachment';
@ -539,10 +540,11 @@ function renderDownloadPill({
startDownloadClick: (event: React.MouseEvent) => void;
startDownloadKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
}): JSX.Element | null {
const downloadedOrPending = attachments.some(
attachment => attachment.path || attachment.pending
const downloadedOrPendingOrIncremental = attachments.some(
attachment =>
attachment.path || attachment.pending || isIncremental(attachment)
);
if (downloadedOrPending) {
if (downloadedOrPendingOrIncremental) {
return null;
}