Skip to content

Commit 1946590

Browse files
authored
Merge pull request #68 from Kirari04/fix/player-iframe-sizing
fix(ui): improve player responsiveness in iframes
2 parents f152044 + 0cbe1dc commit 1946590

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

views/player_v2.html

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,23 @@
4343
--media-focus-ring: 0 0 0 3px rgb(255 255 255 / 0.5);
4444
}
4545

46+
* {
47+
box-sizing: border-box;
48+
}
49+
50+
html,
4651
body {
4752
margin: 0;
4853
padding: 0;
49-
background-color: #09090b; /* Zinc 950 */
54+
width: 100%;
55+
height: 100%;
56+
background-color: #000;
57+
overflow: hidden;
58+
}
59+
60+
body {
5061
color: #fff;
5162
font-family: var(--font-sans);
52-
height: 100vh;
53-
width: 100vw;
54-
overflow: hidden;
5563
display: flex;
5664
align-items: center;
5765
justify-content: center;
@@ -63,13 +71,16 @@
6371
display: flex;
6472
align-items: center;
6573
justify-content: center;
74+
position: relative;
6675
}
6776

6877
media-player {
6978
width: 100%;
7079
height: 100%;
7180
border: none;
7281
background-color: transparent;
82+
/* Ensure the player doesn't force an aspect ratio that overflows the container */
83+
aspect-ratio: auto;
7384
}
7485

7586
/* Continue Watching Popup */
@@ -156,6 +167,7 @@
156167
<media-player
157168
title="{{ .Title }}"
158169
poster="{{ .Thumbnail }}"
170+
view-type="video"
159171
crossorigin
160172
playsinline
161173
>

0 commit comments

Comments
 (0)