File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 5
5
overflow : hidden;
6
6
}
7
7
8
+ .section {
9
+ position : absolute;
10
+ inset : 0 0 0 0 ;
11
+ }
12
+
8
13
.video {
9
14
outline : none;
10
15
width : 100% ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ type Props = {
22
22
url : string ;
23
23
} ;
24
24
preload : 'auto' | 'metadata' | 'none' ;
25
+ section ?: boolean ;
25
26
} ;
26
27
27
28
const Video = ( {
@@ -34,6 +35,7 @@ const Video = ({
34
35
loop,
35
36
disableTracking,
36
37
autoplay = false ,
38
+ section = false ,
37
39
} : Props ) => {
38
40
const videoRef = useRef < HTMLVideoElement > ( ) ;
39
41
const stateRef = useRef < { current : number ; maxProgress : number } > ( {
@@ -184,9 +186,11 @@ const Video = ({
184
186
let videoCl = styles . video ;
185
187
if ( fill ) videoCl += ' ' + styles . fill ;
186
188
189
+ let cl = styles . wrapper ;
190
+ if ( section ) cl = styles . section ;
187
191
188
192
return (
189
- < div className = { styles . wrapper } >
193
+ < div className = { cl } >
190
194
{ ! video && (
191
195
< div className = { styles . empty } >
192
196
< h3 > Double-click to select video</ h3 >
You can’t perform that action at this time.
0 commit comments