this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix unknown media not working

+8 -6
+6 -2
src/components/media.jsx
··· 103 103 [to], 104 104 ); 105 105 106 - const isImage = type === 'image' || (type === 'unknown' && previewUrl); 106 + const isVideoMaybe = 107 + type === 'unknown' && 108 + /\.(mp4|m4a|m4p|m4b|m4r|m4v|mov|webm)$/i.test(remoteMediaURL); 109 + const isImage = 110 + type === 'image' || (type === 'unknown' && previewUrl && !isVideoMaybe); 107 111 108 112 const parentRef = useRef(); 109 113 const [imageSmallerThanParent, setImageSmallerThanParent] = useState(false); ··· 221 225 )} 222 226 </Parent> 223 227 ); 224 - } else if (type === 'gifv' || type === 'video') { 228 + } else if (type === 'gifv' || type === 'video' || isVideoMaybe) { 225 229 const shortDuration = original.duration < 31; 226 230 const isGIF = type === 'gifv' && shortDuration; 227 231 // If GIF is too long, treat it as a video
+2 -4
src/components/status.css
··· 779 779 position: relative; 780 780 background-clip: padding-box; 781 781 } 782 - .status :is(.media-video, .media-audio)[data-formatted-duration] .media-play { 782 + .status :is(.media-video, .media-audio) .media-play { 783 783 pointer-events: none; 784 784 width: 44px; 785 785 height: 44px; ··· 797 797 border-radius: 70px; 798 798 transition: all 0.2s ease-in-out; 799 799 } 800 - .status 801 - :is(.media-video, .media-audio)[data-formatted-duration]:hover:not(:active) 802 - .media-play { 800 + .status :is(.media-video, .media-audio):hover:not(:active) .media-play { 803 801 transform: translate(-50%, -50%) scale(1.1); 804 802 background-color: var(--bg-color); 805 803 box-shadow: 0 0 16px var(--drop-shadow-color),