From d60f0a6e97a9c2b9952b4a5da73babb65fb93949 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 2 Feb 2026 15:05:34 -0600 Subject: [PATCH] mute gifs --- .../VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx | 2 +- .../Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx | 2 +- src/view/com/composer/videos/VideoPreview.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx index bbcf72238b..bb72a6c687 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx @@ -58,7 +58,7 @@ export function VideoEmbedInnerNative({ { setIsActive(e.nativeEvent.isActive) diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx index eaed00e5d8..3eb73f8548 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx @@ -64,7 +64,7 @@ export function VideoEmbedInnerWeb({ style={{width: '100%', height: '100%', objectFit: 'contain'}} playsInline preload="none" - muted={!focused} + muted={embed.presentation === 'gif' || !focused} aria-labelledby={embed.alt ? figId : undefined} onTimeUpdate={e => { lastKnownTime.current = e.currentTarget.currentTime diff --git a/src/view/com/composer/videos/VideoPreview.tsx b/src/view/com/composer/videos/VideoPreview.tsx index 84cb1dba75..9736bd5844 100644 --- a/src/view/com/composer/videos/VideoPreview.tsx +++ b/src/view/com/composer/videos/VideoPreview.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {useRef} from 'react' import {View} from 'react-native' import {Image} from 'expo-image' import {type ImagePickerAsset} from 'expo-image-picker' @@ -24,7 +24,7 @@ export function VideoPreview({ clear: () => void }) { const t = useTheme() - const playerRef = React.useRef(null) + const playerRef = useRef(null) const autoplayDisabled = useAutoplayDisabled() let aspectRatio = asset.width / asset.height