Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

[Video] Toggle controls when entering fullscreen (#5113)

authored by

Hailey and committed by
GitHub
7f26ad50 5d300bec

+4 -1
+4 -1
src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx
··· 26 26 const {_} = useLingui() 27 27 const {player} = useActiveVideoNative() 28 28 const ref = useRef<VideoView>(null) 29 + const [isFullscreen, setIsFullscreen] = useState(false) 29 30 30 31 const enterFullscreen = useCallback(() => { 31 32 ref.current?.enterFullscreen() ··· 46 47 player={player} 47 48 style={[a.flex_1, a.rounded_sm]} 48 49 contentFit="contain" 49 - nativeControls={false} 50 + nativeControls={isFullscreen} 50 51 accessibilityIgnoresInvertColors 51 52 onEnterFullscreen={() => { 52 53 PlatformInfo.setAudioCategory(AudioCategory.Playback) 53 54 PlatformInfo.setAudioActive(true) 54 55 player.muted = false 56 + setIsFullscreen(true) 55 57 }} 56 58 onExitFullscreen={() => { 57 59 PlatformInfo.setAudioCategory(AudioCategory.Ambient) ··· 60 62 if (!player.playing) { 61 63 player.play() 62 64 } 65 + setIsFullscreen(false) 63 66 }} 64 67 accessibilityLabel={ 65 68 embed.alt ? _(msg`Video: ${embed.alt}`) : _(msg`Video`)