1 2document.addEventListener('DOMContentLoaded', function() { 3 const section = document.querySelector('[data-plugin-video-background]'); 4 const loader = document.getElementById('videoLoader'); 5 6 if (section && loader) { 7 // à¹à¸à¹ MutationObserver หรืà¸à¸à¸£à¸§à¸à¸à¸±à¸à¸à¸²à¸£à¸ªà¸£à¹à¸²à¸à¹à¸à¹à¸ <video> à¸à¸µà¹à¸à¸¹à¸à¸à¸¶à¸à¹à¸à¹à¸²à¸¡à¸²à¸à¹à¸§à¸¢à¸ªà¸à¸£à¸´à¸à¸à¹ 8 const checkVideo = setInterval(function() { 9 const video = section.querySelector('video'); 10 if (video) { 11 clearInterval(checkVideo); 12 13 // à¸à¸£à¸§à¸à¸§à¹à¸²à¸§à¸´à¸à¸µà¹à¸à¸à¸³à¸¥à¸±à¸à¹à¸¥à¹à¸à¸à¸¢à¸¹à¹à¸«à¸£à¸·à¸à¹à¸¡à¹ 14 if (!video.paused && video.readyState >= 3) { 15 loader.classList.add('loaded'); 16 } else { 17 // หาà¸à¸¢à¸±à¸à¹à¸¡à¹à¹à¸¥à¹à¸ à¹à¸«à¹à¸à¹à¸à¸ Spinner à¹à¸¡à¸·à¹à¸à¸§à¸´à¸à¸µà¹à¸à¹à¸¥à¹à¸ (playing) 18 video.addEventListener('playing', function() { 19 loader.classList.add('loaded'); 20 }); 21 22 // สำรà¸à¸à¸à¸£à¸à¸µ Event à¹à¸¡à¹à¸à¸³à¸à¸²à¸ หาà¸à¸§à¸´à¸à¸µà¹à¸à¹à¸«à¸¥à¸à¸à¸²à¸à¹à¸à¸´à¸ 3 วิà¸à¸²à¸à¸µà¹à¸«à¹à¸à¹à¸à¸ Spinner à¸à¸±à¸à¸à¸µ 23 setTimeout(function() { 24 loader.classList.add('loaded'); 25 }, 3000); 26 } 27 } 28 }, 300); 29 } 30});
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.