Skip to content

Commit 2ed433a

Browse files
committed
Tweak controls
1 parent 48516da commit 2ed433a

File tree

2 files changed

+14
-61
lines changed

2 files changed

+14
-61
lines changed

src/components/LiveVideo/LiveVideo.module.scss

Lines changed: 13 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
position: absolute;
77
width: 100%;
88
height: 100%;
9-
background-color: var(--background-site);
9+
background-color: #000;
1010
opacity: 0.4;
1111
top: 0;
1212
left: 0;
@@ -18,10 +18,14 @@
1818

1919
.controllBar {
2020
width: 100%;
21-
display: none;
21+
height: 100%;
22+
display: flex;
2223
flex-direction: column;
24+
justify-content: flex-end;
2325
--media-control-background: transparent;
2426
--media-control-hover-background: transparent;
27+
background-color: rgba(0,0,0,0.4);
28+
padding-bottom: 12px;
2529

2630
.timeRange {
2731
width: 100%;
@@ -79,7 +83,7 @@
7983
}
8084

8185
media-time-display {
82-
--media-text-color: var(--text-primary);
86+
--media-text-color: #FFF;
8387
z-index: 1;
8488
}
8589
}
@@ -89,68 +93,18 @@
8993
display: block;
9094
}
9195

92-
.controllBar {
93-
display: flex;
94-
}
95-
}
96-
97-
.customControls {
98-
position: absolute;
99-
bottom: 0;
100-
left: 0;
101-
right: 0;
102-
background: linear-gradient(transparent, rgba(0,0,0,0.8));
103-
padding: 15px;
104-
opacity: 0;
105-
transition: opacity 0.3s ease;
106-
display: flex;
107-
flex-direction: column;
108-
109-
.timeProgress {
110-
width: 100%;
111-
height: 20px;
112-
113-
position: relative;
96+
/* .controllBar {
11497
display: flex;
115-
align-items: center;
116-
117-
.progressPassed {
118-
height: 4px;
119-
border-radius: 9px;
120-
background: #CA077C;
121-
}
122-
123-
.progressFuture {
124-
height: 4px;
125-
border-radius: 9px;
126-
background: rgba(255, 255, 255, 0.25);
127-
}
128-
129-
.progressHandle {
130-
position: absolute;
131-
width: 20px;
132-
height: 20px;
133-
border-radius: 99px;
134-
background: #CA077C;
135-
}
136-
137-
}
98+
} */
13899
}
139-
140-
&:hover {
141-
.customControls {
142-
opacity: 1;
143-
}
144-
}
145-
146100
}
147101

148102
.playIcon {
149103
width: 16px;
150104
height: 16px;
151105
display: inline-block;
152106
margin: 0px 0px;
153-
background-color: var(--text-primary);
107+
background-color: #FFF;
154108
-webkit-mask: url(../../assets/icons/video_controlls/play.svg) no-repeat center;
155109
mask: url(../../assets/icons/video_controlls/play.svg) no-repeat center;
156110
}
@@ -160,7 +114,7 @@
160114
height: 16px;
161115
display: inline-block;
162116
margin: 0px 0px;
163-
background-color: var(--text-primary);
117+
background-color: #FFF;
164118
-webkit-mask: url(../../assets/icons/video_controlls/pause.svg) no-repeat center;
165119
mask: url(../../assets/icons/video_controlls/pause.svg) no-repeat center;
166120
}
@@ -170,7 +124,7 @@
170124
height: 16px;
171125
display: inline-block;
172126
margin: 0px 0px;
173-
background-color: var(--text-primary);
127+
background-color: #FFF;
174128
-webkit-mask: url(../../assets/icons/video_controlls/mute.svg) no-repeat center;
175129
mask: url(../../assets/icons/video_controlls/mute.svg) no-repeat center;
176130
}
@@ -180,7 +134,7 @@
180134
height: 16px;
181135
display: inline-block;
182136
margin: 0px 0px;
183-
background-color: var(--text-primary);
137+
background-color: #FFF;
184138
-webkit-mask: url(../../assets/icons/video_controlls/unmute.svg) no-repeat center;
185139
mask: url(../../assets/icons/video_controlls/unmute.svg) no-repeat center;
186140
}

src/components/LiveVideo/LiveVideo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,13 @@ const LiveVideo: Component<{
107107
return (
108108
<div class={styles.liveVideo} >
109109
<Show when={props.src}>
110-
<media-controller>
110+
<media-controller autohide="2" autohideovercontrols>
111111
<hls-video
112112
src={props.src}
113113
slot="media"
114114
crossorigin
115115
muted
116116
></hls-video>
117-
<div class={styles.shroud}></div>
118117
<media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
119118
<media-control-bar class={styles.controllBar}>
120119
<div>

0 commit comments

Comments
 (0)