File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ <h2>My Projects</h2>
78
78
display = `<img src="${ p . image } " width="100%">`
79
79
} else {
80
80
display = `<video autoplay muted loop width="100%">
81
- <source src="${ p . video } ">
81
+ <source src="${ p . video } " class="vid" >
82
82
</video>`
83
83
}
84
84
const layout = `<div class="grid-item card p-1 m-1">
@@ -94,6 +94,11 @@ <h5>${p.name}</h5>
94
94
} )
95
95
msnry . layout ( )
96
96
imagesLoaded ( '#projects-container' , ( ) => msnry . layout ( ) )
97
+ document . querySelectorAll ( '.vid' ) . forEach ( e => {
98
+ e . onloadeddata = ( ) => {
99
+ msnry . layout ( )
100
+ }
101
+ } )
97
102
} )
98
103
</ script >
99
104
< script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.bundle.min.js "
integrity ="
sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz "
crossorigin ="
anonymous "
> </ script >
You can’t perform that action at this time.
0 commit comments