Skip to content

Commit cef72f4

Browse files
committed
Please work
1 parent 1188439 commit cef72f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h2>My Projects</h2>
7878
display = `<img src="${p.image}" width="100%">`
7979
} else {
8080
display = `<video autoplay muted loop width="100%">
81-
<source src="${p.video}">
81+
<source src="${p.video}" class="vid">
8282
</video>`
8383
}
8484
const layout = `<div class="grid-item card p-1 m-1">
@@ -94,6 +94,11 @@ <h5>${p.name}</h5>
9494
})
9595
msnry.layout()
9696
imagesLoaded('#projects-container', () => msnry.layout())
97+
document.querySelectorAll('.vid').forEach(e => {
98+
e.onloadeddata = () => {
99+
msnry.layout()
100+
}
101+
})
97102
})
98103
</script>
99104
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>

0 commit comments

Comments
 (0)