File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed
Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments