Skip to content

Commit 9c9355d

Browse files
committed
fix the css
1 parent 19a9e9f commit 9c9355d

File tree

5 files changed

+77
-104
lines changed

5 files changed

+77
-104
lines changed

client/src/components/Chat.vue

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ $chat-message-bg: $background-color;
236236
.chat-header {
237237
display: flex;
238238
flex-direction: row;
239+
align-items: center;
239240
border-bottom: 1px solid #666;
240241
}
241242

client/src/components/controls/VideoControls.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ $media-control-background: var(--v-theme-media-control-background, (0, 0, 0));
5555
}
5656
5757
.video-controls {
58-
flex-basis: auto;
5958
min-height: $video-controls-height;
6059
transition: all 0.2s;
6160
z-index: 100;
6261
padding: 12px;
62+
width: 100%;
6363
6464
&.in-video {
65-
position: relative;
66-
bottom: $video-controls-height;
65+
position: absolute;
66+
bottom: 0;
6767
6868
background: linear-gradient(
6969
to top,

client/src/components/players/OmniPlayer.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@
9191
@buffering="onBuffering"
9292
@error="onError"
9393
/>
94-
<v-container v-else fluid fill-height class="no-video">
94+
<div v-else class="no-video">
9595
<h1>{{ $t("video.no-video") }}</h1>
9696
<span>{{ $t("video.no-video-text") }}</span>
97-
</v-container>
97+
</div>
9898
<template #fallback>
99-
<v-container class="no-video">
99+
<div class="no-video">
100100
<v-progress-circular indeterminate />
101-
</v-container>
101+
</div>
102102
</template>
103103
</Suspense>
104104
</div>

client/src/components/players/YoutubePlayer.vue

+2-19
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default {
105105
}
106106
107107
this.resizeObserver = new ResizeObserver(this.fitToContainer);
108+
console.log(this.$el);
108109
this.resizeObserver.observe(this.$el);
109110
},
110111
mounted() {
@@ -280,25 +281,7 @@ export default {
280281
if (!this.player) {
281282
return;
282283
}
283-
if (this.resizeRunawayDetected) {
284-
this.resizeRunawayDetected = false;
285-
return;
286-
}
287-
const before = {
288-
width: this.$el.offsetWidth,
289-
height: this.$el.offsetHeight,
290-
};
291-
this.player.setSize(this.$el.offsetWidth, this.$el.offsetHeight);
292-
if (before.width !== this.$el.offsetWidth || before.height !== this.$el.offsetHeight) {
293-
console.log(
294-
"yt resize (detected runaway)",
295-
before,
296-
this.$el.offsetWidth,
297-
this.$el.offsetHeight
298-
);
299-
this.resizeRunawayDetected = true;
300-
this.player.setSize(before.width, before.height);
301-
}
284+
this.player.setSize("100%", "100%");
302285
},
303286
},
304287
watch: {

client/src/views/Room.vue

+67-78
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
<span id="connectStatus">{{ connectionStatus }}</span>
2727
</div>
2828
<div class="video-container">
29-
<div
30-
class="video-subcontainer"
31-
:style="{ padding: store.state.fullscreen ? 0 : 'inherit' }"
32-
>
29+
<div class="video-subcontainer">
3330
<div class="player-container">
3431
<OmniPlayer
3532
:source="store.state.room.currentSource"
@@ -39,7 +36,7 @@
3936
@ready="onPlayerReady"
4037
/>
4138
<div id="mouse-event-swallower" :class="{ hide: controlsVisible }"></div>
42-
<div class="in-video-chat" v-if="controlsMode == 'in-video'">
39+
<div class="in-video-chat" v-if="controlsMode === 'in-video'">
4340
<Chat ref="chat" @link-click="setAddPreviewText" />
4441
</div>
4542
<div class="playback-blocked-prompt" v-if="mediaPlaybackBlocked">
@@ -61,7 +58,10 @@
6158
:mode="controlsMode"
6259
/>
6360
</div>
64-
<div class="out-video-chat" v-if="controlsMode == 'outside-video' && !fullscreen">
61+
<div
62+
class="out-video-chat"
63+
v-if="controlsMode === 'outside-video' && !store.state.fullscreen"
64+
>
6565
<Chat ref="chat" @link-click="setAddPreviewText" />
6666
</div>
6767
</div>
@@ -725,30 +725,29 @@ $in-video-chat-width: 400px;
725725
$in-video-chat-width-small: 250px;
726726
727727
.video-container {
728-
position: relative;
729-
display: flex;
730-
justify-content: center;
731-
align-items: center;
732-
flex-direction: row;
728+
display: grid;
729+
grid-template-columns: 1fr auto;
730+
grid-template-rows: minmax(400px, 70vh);
733731
width: 100%;
734-
735-
@media (max-width: $md-max) {
736-
margin-left: 0;
737-
margin-right: 0;
738-
}
739732
}
740733
741734
.video-subcontainer {
742735
position: relative;
743736
display: flex;
744737
flex-direction: column;
745-
flex-grow: 1;
738+
height: 100%;
739+
}
740+
741+
.player-container {
746742
width: 100%;
743+
height: 100%;
747744
}
748745
749746
.layout-default {
750747
.video-subcontainer {
751-
max-width: 80%;
748+
width: 80%;
749+
justify-self: center;
750+
752751
@media (max-width: $md-max) {
753752
max-width: 100%;
754753
}
@@ -759,45 +758,34 @@ $in-video-chat-width-small: 250px;
759758
padding: 0;
760759
761760
.video-container {
762-
height: 85vh;
763-
width: 100%;
761+
grid-template-rows: minmax(400px, 85vh);
764762
}
765763
766764
.room-title {
767765
font-size: 24px;
768766
}
769767
}
770768
771-
#mouse-event-swallower {
772-
position: absolute;
773-
top: 0;
774-
width: 100%;
775-
height: 100%;
769+
.fullscreen {
770+
padding: 0;
776771
777-
&.hide {
778-
display: none;
772+
.video-container {
773+
display: block;
774+
margin: 0;
775+
height: 100vh;
776+
max-height: 100vh;
777+
aspect-ratio: inherit;
778+
width: 100vw;
779779
}
780-
}
781-
782-
.user-invite-container {
783-
padding: 0 10px;
784-
min-height: 500px;
785780
786-
> * {
787-
margin-bottom: 10px;
781+
.video-subcontainer {
782+
width: 100%;
783+
max-height: 100vh;
784+
padding: 0;
788785
}
789-
}
790-
791-
.queue-tab-content {
792-
// HACK: the save button in room settings is not sticky if overflow is not "visible"
793-
overflow: visible;
794-
}
795786
796-
.tab-text {
797-
margin: 0 8px;
798-
799-
@media screen and (max-width: $sm-max) {
800-
display: none;
787+
.player-container {
788+
height: 100vh;
801789
}
802790
}
803791
@@ -828,6 +816,39 @@ $in-video-chat-width-small: 250px;
828816
pointer-events: none;
829817
}
830818
819+
#mouse-event-swallower {
820+
position: absolute;
821+
top: 0;
822+
width: 100%;
823+
height: 100%;
824+
825+
&.hide {
826+
display: none;
827+
}
828+
}
829+
830+
.user-invite-container {
831+
padding: 0 10px;
832+
min-height: 500px;
833+
834+
> * {
835+
margin-bottom: 10px;
836+
}
837+
}
838+
839+
.queue-tab-content {
840+
// HACK: the save button in room settings is not sticky if overflow is not "visible"
841+
overflow: visible;
842+
}
843+
844+
.tab-text {
845+
margin: 0 8px;
846+
847+
@media screen and (max-width: $sm-max) {
848+
display: none;
849+
}
850+
}
851+
831852
.playback-blocked-prompt {
832853
position: absolute;
833854
top: 0;
@@ -847,39 +868,6 @@ $in-video-chat-width-small: 250px;
847868
transition: transform 0s;
848869
}
849870
850-
.player-container {
851-
position: relative;
852-
width: 100%;
853-
height: 100%;
854-
aspect-ratio: 16 / 9;
855-
856-
@media (min-aspect-ratio: 16 / 9) {
857-
aspect-ratio: initial;
858-
}
859-
}
860-
861-
.fullscreen {
862-
padding: 0;
863-
864-
.video-container {
865-
display: block;
866-
margin: 0;
867-
height: 100vh;
868-
max-height: 100vh;
869-
aspect-ratio: inherit;
870-
width: 100vw;
871-
}
872-
873-
.video-subcontainer {
874-
width: 100%;
875-
max-height: 100vh;
876-
}
877-
878-
.player-container {
879-
height: 100vh;
880-
}
881-
}
882-
883871
.room {
884872
@media (max-width: $md-max) {
885873
padding: 0;
@@ -889,6 +877,7 @@ $in-video-chat-width-small: 250px;
889877
.room-header {
890878
display: flex;
891879
flex-direction: row;
880+
align-items: center;
892881
margin: 0 10px;
893882
> * {
894883
align-self: flex-end;

0 commit comments

Comments
 (0)