Skip to content

Commit 1a1a84f

Browse files
committed
Changes
1 parent 030e540 commit 1a1a84f

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

_site/static/js/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ $(document).ready(function() {
8181
var visibilityObserver = new IntersectionObserver(function(entries) {
8282
entries.forEach(function(entry) {
8383
var video = entry.target;
84-
var isVisible = entry.isIntersecting && entry.intersectionRatio >= 0.6;
84+
var isVisible = entry.isIntersecting && entry.intersectionRatio >= 0.9;
8585

8686
if (isVisible) {
8787
video.setAttribute('preload', 'auto');
8888

8989
var carouselRoot = video.closest('.carousel');
90-
if (carouselRoot) {
91-
carouselRoot.querySelectorAll('video').forEach(function(sibling) {
92-
if (sibling !== video && !sibling.paused) {
93-
try { sibling.pause(); } catch (e) { /* no-op */ }
94-
}
95-
});
96-
}
90+
// if (carouselRoot) {
91+
// carouselRoot.querySelectorAll('video').forEach(function(sibling) {
92+
// if (sibling !== video && !sibling.paused) {
93+
// try { sibling.pause(); } catch (e) { /* no-op */ }
94+
// }
95+
// });
96+
// }
9797

9898
video.play().catch(function() { /* Autoplay might be blocked; ignore */ });
9999
} else {

static/js/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ $(document).ready(function() {
8181
var visibilityObserver = new IntersectionObserver(function(entries) {
8282
entries.forEach(function(entry) {
8383
var video = entry.target;
84-
var isVisible = entry.isIntersecting && entry.intersectionRatio >= 0.6;
84+
var isVisible = entry.isIntersecting && entry.intersectionRatio >= 0.9;
8585

8686
if (isVisible) {
8787
video.setAttribute('preload', 'auto');
8888

8989
var carouselRoot = video.closest('.carousel');
90-
if (carouselRoot) {
91-
carouselRoot.querySelectorAll('video').forEach(function(sibling) {
92-
if (sibling !== video && !sibling.paused) {
93-
try { sibling.pause(); } catch (e) { /* no-op */ }
94-
}
95-
});
96-
}
90+
// if (carouselRoot) {
91+
// carouselRoot.querySelectorAll('video').forEach(function(sibling) {
92+
// if (sibling !== video && !sibling.paused) {
93+
// try { sibling.pause(); } catch (e) { /* no-op */ }
94+
// }
95+
// });
96+
// }
9797

9898
video.play().catch(function() { /* Autoplay might be blocked; ignore */ });
9999
} else {

0 commit comments

Comments
 (0)