Skip to content

Commit

Permalink
Apply correct video height - works on small web as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejSWM committed Mar 7, 2024
1 parent 35cb276 commit 52ed123
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/OnboardingWelcomeVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ function OnboardingWelcomeVideo() {
return (
<View
style={[
// Prevent layout jumps by reserving height for the video
{height: VIDEO_HEIGHT - 2 * MODAL_PADDING},
// Prevent layout jumps by reserving height
// for the video until it loads.
{height: videoWidth / videoAspectRatio},
]}
>
<VideoPlayer
Expand Down Expand Up @@ -130,7 +131,7 @@ function OnboardingWelcomeVideo() {
isVisible={isModalVisible}
type={shouldUseNarrowLayout ? CONST.MODAL.MODAL_TYPE.CENTERED_SMALL : CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED}
onClose={closeModal}
innerContainerStyle={shouldUseNarrowLayout ? {} : {paddingTop: MODAL_PADDING, paddingBottom: MODAL_PADDING}}
innerContainerStyle={shouldUseNarrowLayout ? undefined : {paddingTop: MODAL_PADDING, paddingBottom: MODAL_PADDING}}
>
<View
style={[styles.mh100, shouldUseNarrowLayout && styles.welcomeVideoNarrowLayout]}
Expand Down

0 comments on commit 52ed123

Please sign in to comment.