1$(function () { 2 let words = $('.word'); 3 let currentIndex = 0; 4 5 function showNextWord() { 6 words.removeClass('show'); 7 $(words[currentIndex]).addClass('show'); 8 currentIndex = (currentIndex + 1) % words.length; 9 } 10 11 showNextWord(); 12 13 setInterval(showNextWord, 2000); 14 15 vediocontrols(); 16}); 17 18function vediocontrols() { 19 $('.ce-textvideohero').each(function () { 20 var $container = $(this); 21 var $soundBtn = $container.find('.video-sound-toggle'); 22 var $playPauseBtn = $container.find('.playpause'); 23 var $overlayImg = $container.find('.image-overlay'); 24 var video = $container.find('video:visible').get(0); 25 26 // Case 1: Only image (no video) 27 if (!video && $overlayImg.length) return; 28 29 // Case 2: Video only 30 if (video && !$overlayImg.length) { 31 video.muted = true; 32 video.play(); 33 $playPauseBtn.addClass('playing'); 34 } 35 36 // Case 3: Image + video 37 // Autoplay the video but keep the overlay image visible at all times. 38 if (video && $overlayImg.length) { 39 video.muted = true; 40 video.play(); 41 $playPauseBtn.addClass('playing'); 42 // Intentionally do NOT hide the overlay image when the video plays. 43 } 44 45 // Sound toggle 46 $soundBtn.on('click', function (e) { 47 e.stopPropagation(); 48 video.muted = !video.muted; 49 $soundBtn.toggleClass('unmuted', !video.muted); 50 }); 51 52 // Play/Pause toggle 53 $playPauseBtn.on('click', function () { 54 if (video.paused) { 55 video.play(); 56 $playPauseBtn.removeClass('paused').addClass('playing'); 57 // Keep overlay visible when playing 58 } else { 59 video.pause(); 60 $playPauseBtn.removeClass('playing').addClass('paused'); 61 // Keep overlay visible when paused 62 } 63 }); 64 }); 65 66}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.