File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 24
24
position : relative;
25
25
}
26
26
27
- .video [data-embed-is-loaded = "true" ] .video-placeholder ,
28
- .video [data-embed-is-loaded = "false" ] .video-placeholder + * {
29
- visibility : hidden;
30
- height : 0 ;
31
- width : 0 ;
32
- }
33
-
34
27
.video .video-placeholder > * {
35
28
display : flex;
36
29
align-items : center;
39
32
inset : 0 ;
40
33
}
41
34
35
+ .video [data-embed-is-loaded = "true" ] .video-placeholder ,
36
+ .video [data-embed-is-loaded = "false" ] .video-placeholder + * {
37
+ visibility : hidden;
38
+ height : 0 ;
39
+ width : 0 ;
40
+ }
41
+
42
42
.video .video-placeholder picture img {
43
43
width : 100% ;
44
44
height : 100% ;
Original file line number Diff line number Diff line change @@ -105,15 +105,17 @@ export default async function decorate(block) {
105
105
block . dataset . embedIsLoaded = false ;
106
106
107
107
const autoplay = block . classList . contains ( 'autoplay' ) ;
108
- if ( ! ! placeholder ) {
108
+ if ( placeholder ) {
109
109
block . classList . add ( 'placeholder' ) ;
110
110
const wrapper = document . createElement ( 'div' ) ;
111
111
wrapper . className = 'video-placeholder' ;
112
112
wrapper . append ( placeholder ) ;
113
113
114
114
if ( ! autoplay ) {
115
- wrapper . insertAdjacentHTML ( 'beforeend' ,
116
- '<div class="video-placeholder-play"><button type="button" title="Play"></button></div>' ) ;
115
+ wrapper . insertAdjacentHTML (
116
+ 'beforeend' ,
117
+ '<div class="video-placeholder-play"><button type="button" title="Play"></button></div>' ,
118
+ ) ;
117
119
wrapper . addEventListener ( 'click' , ( ) => {
118
120
loadVideoEmbed ( block , link , true , false ) ;
119
121
} ) ;
You can’t perform that action at this time.
0 commit comments