Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Safari top/bottom border bug
Browse files Browse the repository at this point in the history
luwes committed Dec 20, 2024

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
1 parent 439d96a commit fe5d5eb
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/players/default-player.tsx
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ const DefaultPlayer = forwardRef<HTMLVideoElement, Omit<MediaProps, 'ref'> & Pla
const showCustomBlur = isCustomPoster && blurDataURL !== asset?.blurDataURL;

if (showGeneratedBlur || showCustomBlur) {
imgStyleProps.gridArea = '1 / 1';
imgStyleProps.gridArea = '1/1';
imgStyleProps.width = '100%';
imgStyleProps.height = '100%';
imgStyleProps.color = 'transparent';
@@ -112,7 +112,7 @@ const DefaultPlayer = forwardRef<HTMLVideoElement, Omit<MediaProps, 'ref'> & Pla
suppressHydrationWarning
ref={forwardedRef}
style={{
gridArea: '1 / 1',
gridArea: '1/1',
}}
slot="media"
poster={poster}
@@ -140,7 +140,7 @@ const DefaultPlayer = forwardRef<HTMLVideoElement, Omit<MediaProps, 'ref'> & Pla
suppressHydrationWarning
ref={forwardedRef}
style={{
gridArea: '1 / 1',
gridArea: '1/1',
...style,
}}
controls={controls === false ? undefined : true}
1 change: 1 addition & 0 deletions src/components/video.tsx
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ const NextVideo = forwardRef<HTMLVideoElement, VideoProps>((props, forwardedRef)
<style>{
/* css */`
.next-video-container {
display: grid; /* Fixes a Safari aspect-ratio + height bug. */
position: relative;
width: 100%;
aspect-ratio: 16 / 9;

0 comments on commit fe5d5eb

Please sign in to comment.