Fix duplicate badging
This commit is contained in:
@@ -99,22 +99,24 @@ export function VideoEmbedInnerNative({
|
||||
altText={embed.alt}
|
||||
/>
|
||||
) : (
|
||||
<VideoPresentationControls
|
||||
enterFullscreen={() => {
|
||||
videoRef.current?.enterFullscreen(true)
|
||||
}}
|
||||
toggleMuted={() => {
|
||||
videoRef.current?.toggleMuted()
|
||||
}}
|
||||
togglePlayback={() => {
|
||||
videoRef.current?.togglePlayback()
|
||||
}}
|
||||
isPlaying={isPlaying}
|
||||
timeRemaining={timeRemaining}
|
||||
/>
|
||||
)}
|
||||
{!isGif && embed.alt && (
|
||||
<AltBadgeWithDialog text={embed.alt} position="top-right" />
|
||||
<>
|
||||
<VideoPresentationControls
|
||||
enterFullscreen={() => {
|
||||
videoRef.current?.enterFullscreen(true)
|
||||
}}
|
||||
toggleMuted={() => {
|
||||
videoRef.current?.toggleMuted()
|
||||
}}
|
||||
togglePlayback={() => {
|
||||
videoRef.current?.togglePlayback()
|
||||
}}
|
||||
isPlaying={isPlaying}
|
||||
timeRemaining={timeRemaining}
|
||||
/>
|
||||
{embed.alt && (
|
||||
<AltBadgeWithDialog text={embed.alt} position="top-right" />
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<MediaInsetBorder />
|
||||
<KeepAwake enabled={isPlaying} />
|
||||
|
||||
@@ -33,6 +33,7 @@ export function VideoEmbedInnerWeb({
|
||||
const figId = useId()
|
||||
const {_} = useLingui()
|
||||
const [isFullscreen] = useFullscreen(containerRef)
|
||||
const isGif = embed.presentation === 'gif'
|
||||
|
||||
// send error up to error boundary
|
||||
const [error, setError] = useState<Error | null>(null)
|
||||
@@ -80,7 +81,7 @@ export function VideoEmbedInnerWeb({
|
||||
</figcaption>
|
||||
)}
|
||||
</figure>
|
||||
{!isFullscreen && embed.alt && (
|
||||
{!isFullscreen && !isGif && embed.alt && (
|
||||
<AltBadgeWithDialog text={embed.alt} position="top-right" />
|
||||
)}
|
||||
<Controls
|
||||
@@ -94,7 +95,7 @@ export function VideoEmbedInnerWeb({
|
||||
onScreen={onScreen}
|
||||
fullscreenRef={containerRef}
|
||||
hasSubtitleTrack={hasSubtitleTrack}
|
||||
isGif={embed.presentation === 'gif'}
|
||||
isGif={isGif}
|
||||
altText={embed.alt}
|
||||
updateCuePositions={updateCuePositions}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user