1// ãã¼ãã¼åç»ï¼åççµäºã»èªã¿è¾¼ã¿å¤±ææã«éæ¢ç»ã¸ãã§ã¼ããã 2(() => { 3 const video = document.querySelector('.hero-video') 4 const still = document.querySelector('.hero-still') 5 if (!video || !still) return 6 7 const showStill = () => { 8 still.classList.add('is-visible') 9 video.classList.add('is-hidden') 10 } 11 12 video.addEventListener('ended', showStill) 13 video.addEventListener('error', showStill) 14 15 const source = video.querySelector('source') 16 if (source) { 17 source.addEventListener('error', showStill) 18 } 19 20 // åç»ãç¨æããã¦ããªãç°å¢ã§ã¯ãèªã¿è¾¼ã¿å¤±æãã¹ã¯ãªããå®è¡åã« 21 // 確å®ãã¦ãããã¨ããããããç¾å¨ã®ç¶æ ã確èªãã 22 if (video.error || video.networkState === HTMLMediaElement.NETWORK_NO_SOURCE) { 23 showStill() 24 } 25 26 video.addEventListener( 27 'canplay', 28 () => { 29 try { 30 const playing = video.play() 31 if (playing && playing.catch) { 32 playing.catch(showStill) 33 } 34 } catch { 35 showStill() 36 } 37 }, 38 { once: true } 39 ) 40})()
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.