mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 10:45:41 +03:00
Should be OR
A short video can be treated as GIF. Loopability is only for <= 60 second video
This commit is contained in:
parent
b96f263f69
commit
71514312bf
1 changed files with 4 additions and 2 deletions
|
@ -732,7 +732,9 @@ function Media({ media, showOriginal, onClick = () => {} }) {
|
|||
);
|
||||
} else if (type === 'gifv' || type === 'video') {
|
||||
// 20 seconds, treat as a gif
|
||||
const isGIF = type === 'gifv' && original.duration <= 20;
|
||||
const shortDuration = original.duration <= 20;
|
||||
const isGIF = type === 'gifv' || shortDuration;
|
||||
const loopable = original.duration <= 60;
|
||||
return (
|
||||
<div
|
||||
class={`media media-${isGIF ? 'gif' : 'video'}`}
|
||||
|
@ -774,7 +776,7 @@ function Media({ media, showOriginal, onClick = () => {} }) {
|
|||
muted={isGIF}
|
||||
controls={!isGIF}
|
||||
playsinline
|
||||
loop
|
||||
loop={loopable}
|
||||
onClick={() => {
|
||||
if (isGIF) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue