1// GSAP + jQuery: section_mission, section_business ì ëë©ì´ì (ë¶ëë¬ì´ ì¤í¬ë¡¤ 미ì¬ì© ë²ì ) 2$(function() { 3 if (typeof gsap === 'undefined' || typeof ScrollTrigger === 'undefined') return; 4 5 // section_mission íì´ëì ì ëë©ì´ì 6 gsap.set('#section_mission', { opacity: 0, y: 60 }); 7 gsap.to('#section_mission', { 8 scrollTrigger: { 9 trigger: '#section_mission', 10 start: 'top 80%', 11 toggleActions: 'play none none none' 12 }, 13 opacity: 1, 14 y: 0, 15 duration: 1.2, 16 ease: 'power3.out', 17 }); 18 19 // section_business: intro_title, intro_desc, intro_image ê°ê° ì ëë©ì´ì 20 $('.section_business').each(function(_, el) { 21 var $section = $(el); 22 var $title = $section.find('.intro_title'); 23 var $desc = $section.find('.intro_desc'); 24 var $img = $section.find('.intro_image'); 25 26 // ì´ê¸° ìí ì¸í 27 gsap.set([$title[0], $desc[0]], { opacity: 0, y: 40 }); 28 gsap.set($img[0], { opacity: 0, scale: 0.95 }); 29 30 // íì´í ì ëë©ì´ì 31 gsap.to($title[0], { 32 scrollTrigger: { 33 trigger: $section[0], 34 start: 'top 80%' 35 }, 36 opacity: 1, 37 y: 0, 38 duration: 0.9, 39 ease: 'power3.out', 40 delay: 0.1 41 }); 42 // ì¤ëª ì ëë©ì´ì 43 gsap.to($desc[0], { 44 scrollTrigger: { 45 trigger: $section[0], 46 start: 'top 75%' 47 }, 48 opacity: 1, 49 y: 0, 50 duration: 0.9, 51 ease: 'power3.out', 52 delay: 0.3 53 }); 54 // ì´ë¯¸ì§ ì ëë©ì´ì 55 gsap.to($img[0], { 56 scrollTrigger: { 57 trigger: $section[0], 58 start: 'top 70%' 59 }, 60 opacity: 1, 61 scale: 1, 62 duration: 1.1, 63 ease: 'power3.out', 64 delay: 0.5 65 }); 66 }); 67}); 68 69 70// 1. YouTube IFrame API ë¡ë 71var tag = document.createElement('script'); 72tag.src = "https://www.youtube.com/iframe_api"; 73var firstScriptTag = document.getElementsByTagName('script')[0]; 74firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 75var my_video_id = ""; // ë¡ë³´í°ì¦ ìì ID 76if(is_mobile==1){ 77 my_video_id = "3E4E9bY55VI"; // ìí¼ https://youtube.com/shorts/3E4E9bY55VI 78}else{ 79 my_video_id = "Q2dYRVE1dmI"; // ë¡±í¼ https://www.youtube.com/watch?v=Q2dYRVE1dmI 80} 81var player; 82function onYouTubeIframeAPIReady() { 83 player = new YT.Player('player', { 84 videoId: my_video_id, 85 playerVars: { 86 'autoplay': 1, 87 'mute': 1, 88 'controls': 0, 89 // loop / playlist ì ê±° â ì¬ìëª©ë¡ ë´ë¹ê²ì´ì 컨í¸ë¡¤ë¬(ì´ì /ë¤ì) ë ¸ì¶ ìì¸ 90 'modestbranding': 1, 91 'rel': 0, 92 'iv_load_policy': 3, 93 'playsinline': 1, 94 'disablekb': 1, // í¤ë³´ë ë¨ì¶í¤ ë¹íì±í 95 'fs': 0, // ì ì²´íë©´ ë²í¼ ì¨ê¹ 96 'showinfo': 0, // ìì ì ë³´ ì¨ê¹ (구ë²ì íë ì´ì´ í¸í) 97 'cc_load_policy': 0 // ìë§ ìë íì ì í¨ 98 }, 99 events: { 100 'onReady': onPlayerReady, 101 'onStateChange': onPlayerStateChange 102 } 103 }); 104} 105 106function onPlayerReady(event) { 107 event.target.mute(); 108 event.target.playVideo(); 109 110 // YouTube iframeì PIP/미ëì´ ì»¨í¸ë¡¤ ë¹íì±í ìì± ì¶ê° 111 var iframe = event.target.getIframe(); 112 if (iframe) { 113 iframe.setAttribute('disablepictureinpicture', ''); 114 iframe.setAttribute('controlslist', 'nodownload nofullscreen noremoteplayback'); 115 iframe.style.pointerEvents = 'none'; 116 } 117 118 // ë¸ë¼ì°ì ì 미ëì´ ì¸ì 컨í¸ë¡¤(ì¤ì ì¬ì/ì´ì /ë¤ì ë²í¼) ë¹íì±í 119 if ('mediaSession' in navigator) { 120 try { 121 navigator.mediaSession.setActionHandler('play', null); 122 navigator.mediaSession.setActionHandler('pause', null); 123 navigator.mediaSession.setActionHandler('previoustrack', null); 124 navigator.mediaSession.setActionHandler('nexttrack', null); 125 navigator.mediaSession.setActionHandler('seekbackward', null); 126 navigator.mediaSession.setActionHandler('seekforward', null); 127 navigator.mediaSession.setActionHandler('stop', null); 128 navigator.mediaSession.playbackState = 'none'; 129 } catch (e) {} 130 } 131} 132 133function onPlayerStateChange(event) { 134 // ìì ì¬ìì´ ììëë©´ ê²ì íë©´ ë°©ì§ë¥¼ ìí´ í¬ì¤í°ë¥¼ ì¨ê¹ 135 if (event.data == YT.PlayerState.PLAYING) { 136 document.getElementById('videoPoster').classList.add('is-hidden'); 137 startSeamlessLoop(event.target); 138 139 // ì¬ì ì ë¸ë¼ì°ì 미ëì´ ì¸ì ì´ ë¤ì íì±íëë ê²ì ë§ì 140 if ('mediaSession' in navigator) {
141 try { 142 navigator.mediaSession.playbackState = 'none'; 143 navigator.mediaSession.metadata = null; 144 } catch (e) {} 145 } 146 } 147 148 // playlist/loop ìµì ì ì ê±°íì¼ë¯ë¡ ììì´ ëëë©´ ìëì¼ë¡ ë¤ì ì¬ì 149 if (event.data == YT.PlayerState.ENDED) { 150 event.target.seekTo(0); 151 event.target.playVideo(); 152 } 153} 154 155// ìì ëë¶ë¶ì ë¡ë© ì§ì°ì ìì ë íµì¬ ë¡ì§ 156function startSeamlessLoop(playerInstance) { 157 setInterval(function() { 158 var duration = playerInstance.getDuration(); 159 var currentTime = playerInstance.getCurrentTime(); 160 161 // ìì ì¢ ë£ 0.5ì´ ì ì 미리 ì²ìì¼ë¡ ì´ëìì¼ ë©ì¶¤ íì ì ê±° 162 if (duration > 0 && (duration - currentTime < 0.5)) { 163 playerInstance.seekTo(0); 164 } 165 }, 200); 166}
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.