From 6d893967ec13a9fda13492a2818ab867f5b0ec50 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 6 Jan 2023 19:14:47 +0800 Subject: [PATCH] Maybe some videos are short --- src/components/status.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index e03dcd83..818c2c95 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -756,7 +756,8 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) { } else if (type === 'gifv' || type === 'video') { // 20 seconds, treat as a gif const shortDuration = original.duration <= 20; - const isGIF = type === 'gifv' || shortDuration; + const isGIFV = type === 'gifv'; + const isGIF = isGIFV || shortDuration; const loopable = original.duration <= 60; const formattedDuration = formatDuration(original.duration); const hoverAnimate = !showOriginal && !autoAnimate && isGIF; @@ -810,7 +811,7 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) { preload="auto" autoplay muted="${isGIF}" - ${isGIF ? '' : 'controls'} + ${isGIFV ? '' : 'controls'} playsinline loop="${loopable}" >