-
Notifications
You must be signed in to change notification settings - Fork 30
Mute other Looping Videos when playing audio #14142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Size Change: +224 B (+0.02%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
@@ -81,6 +81,15 @@ export const decideCardPositions = (cards: DCRFrontCard[]): GroupedCards => { | |||
}, []); | |||
}; | |||
|
|||
type ImmersiveCardLayoutProps = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've extracted the Props out into their own types for a few components here, to meet convention.
const isLoopingVideo = card.mainMedia?.type === 'LoopVideo'; | ||
|
||
return ( | ||
<UL padBottom={true} key={card.url}> | ||
<UL padBottom={true}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood how keys work in a previous PR. The should be added to the first child inside the map, even if that is a Component.
@@ -593,8 +597,16 @@ export const FlexibleGeneral = ({ | |||
collectionId, | |||
isInHideTrailsAbTest, | |||
}: Props) => { | |||
const splash = [...groupedTrails.splash].slice(0, 1); | |||
const cards = [...groupedTrails.standard].slice(0, 19); | |||
const splash = [...groupedTrails.splash].slice(0, 1).map((snap) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given how we store cards in separate groupings (e.g. splash
) and find them from curated
and backfill
, it was very fiddly to apply a unique index above this component.
What does this change?
Why?
UX improvement. Two videos playing audio at the same time is almost never desirable and is disorientating.
Screenshots
It's quite small, but the audio icon flicks from "sound" to "muted" state, when a different video has audio enabled.
Screen.Recording.2025-06-26.at.16.35.51.mov