Fix duplicate badging

This commit is contained in:
Eric Bailey
2026-06-25 16:34:19 -05:00
parent c4f79fbf6b
commit 3c1735fea0
2 changed files with 21 additions and 18 deletions
@@ -99,6 +99,7 @@ export function VideoEmbedInnerNative({
altText={embed.alt} altText={embed.alt}
/> />
) : ( ) : (
<>
<VideoPresentationControls <VideoPresentationControls
enterFullscreen={() => { enterFullscreen={() => {
videoRef.current?.enterFullscreen(true) videoRef.current?.enterFullscreen(true)
@@ -112,10 +113,11 @@ export function VideoEmbedInnerNative({
isPlaying={isPlaying} isPlaying={isPlaying}
timeRemaining={timeRemaining} timeRemaining={timeRemaining}
/> />
)} {embed.alt && (
{!isGif && embed.alt && (
<AltBadgeWithDialog text={embed.alt} position="top-right" /> <AltBadgeWithDialog text={embed.alt} position="top-right" />
)} )}
</>
)}
<MediaInsetBorder /> <MediaInsetBorder />
<KeepAwake enabled={isPlaying} /> <KeepAwake enabled={isPlaying} />
</View> </View>
@@ -33,6 +33,7 @@ export function VideoEmbedInnerWeb({
const figId = useId() const figId = useId()
const {_} = useLingui() const {_} = useLingui()
const [isFullscreen] = useFullscreen(containerRef) const [isFullscreen] = useFullscreen(containerRef)
const isGif = embed.presentation === 'gif'
// send error up to error boundary // send error up to error boundary
const [error, setError] = useState<Error | null>(null) const [error, setError] = useState<Error | null>(null)
@@ -80,7 +81,7 @@ export function VideoEmbedInnerWeb({
</figcaption> </figcaption>
)} )}
</figure> </figure>
{!isFullscreen && embed.alt && ( {!isFullscreen && !isGif && embed.alt && (
<AltBadgeWithDialog text={embed.alt} position="top-right" /> <AltBadgeWithDialog text={embed.alt} position="top-right" />
)} )}
<Controls <Controls
@@ -94,7 +95,7 @@ export function VideoEmbedInnerWeb({
onScreen={onScreen} onScreen={onScreen}
fullscreenRef={containerRef} fullscreenRef={containerRef}
hasSubtitleTrack={hasSubtitleTrack} hasSubtitleTrack={hasSubtitleTrack}
isGif={embed.presentation === 'gif'} isGif={isGif}
altText={embed.alt} altText={embed.alt}
updateCuePositions={updateCuePositions} updateCuePositions={updateCuePositions}
/> />