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,22 +99,24 @@ export function VideoEmbedInnerNative({
altText={embed.alt} altText={embed.alt}
/> />
) : ( ) : (
<VideoPresentationControls <>
enterFullscreen={() => { <VideoPresentationControls
videoRef.current?.enterFullscreen(true) enterFullscreen={() => {
}} videoRef.current?.enterFullscreen(true)
toggleMuted={() => { }}
videoRef.current?.toggleMuted() toggleMuted={() => {
}} videoRef.current?.toggleMuted()
togglePlayback={() => { }}
videoRef.current?.togglePlayback() togglePlayback={() => {
}} videoRef.current?.togglePlayback()
isPlaying={isPlaying} }}
timeRemaining={timeRemaining} isPlaying={isPlaying}
/> timeRemaining={timeRemaining}
)} />
{!isGif && embed.alt && ( {embed.alt && (
<AltBadgeWithDialog text={embed.alt} position="top-right" /> <AltBadgeWithDialog text={embed.alt} position="top-right" />
)}
</>
)} )}
<MediaInsetBorder /> <MediaInsetBorder />
<KeepAwake enabled={isPlaying} /> <KeepAwake enabled={isPlaying} />
@@ -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}
/> />