Skip to content

Commit

Permalink
Merge pull request Expensify#41218 from software-mansion-labs/@Skalak…
Browse files Browse the repository at this point in the history
…id/fix-missing-video-action-bar

Fix missing video action bar on Safari
  • Loading branch information
pecanoro authored May 1, 2024
2 parents 573d989 + c8347da commit 1e82ebb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/VideoPlayerPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@ function VideoPlayerPreview({videoUrl, thumbnailUrl, reportID, fileName, videoDi
accessibilityLabel={fileName}
/>
) : (
<>
<View style={styles.flex1}>
<VideoPlayer
url={videoUrl}
onVideoLoaded={onVideoLoaded as (event: VideoReadyForDisplayEvent) => void}
videoDuration={videoDuration}
shouldUseSmallVideoControls
style={[styles.w100, styles.h100]}
videoPlayerStyle={styles.videoPlayerPreview}
/>
<View style={[styles.pAbsolute, styles.w100]}>
<IconButton
Expand All @@ -95,7 +96,7 @@ function VideoPlayerPreview({videoUrl, thumbnailUrl, reportID, fileName, videoDi
small
/>
</View>
</>
</View>
)}
</View>
);
Expand Down
8 changes: 7 additions & 1 deletion src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ const webViewStyles = (theme: ThemeColors) =>
minWidth: CONST.VIDEO_PLAYER.MIN_WIDTH,
minHeight: CONST.VIDEO_PLAYER.MIN_HEIGHT,
borderRadius: variables.componentBorderRadiusNormal,
overflow: 'hidden',
backgroundColor: theme.highlightBG,
...touchCalloutNone,
},
Expand Down Expand Up @@ -4706,6 +4705,13 @@ const styles = (theme: ThemeColors) =>
lineHeight: variables.lineHeightXXLarge,
},

videoPlayerPreview: {
width: '100%',
height: '100%',
borderRadius: variables.componentBorderRadiusNormal,
backgroundColor: theme.highlightBG,
},

videoPlayerControlsContainer: {
position: 'absolute',
bottom: CONST.VIDEO_PLAYER.CONTROLS_POSITION.NORMAL,
Expand Down

0 comments on commit 1e82ebb

Please sign in to comment.