1'use strict'; 2const Movie = { 3 activeIndex: 0, 4 slide: { 5 instance: null, 6 set() { 7 Movie.slide.instance = new Swiper('.p-movie__slide', { 8 speed: 0, 9 slidesPerView: 1, 10 centeredSlides: false, 11 effect: 'slide', 12 navigation: { 13 nextEl: '.p-movie__nav-item--next', 14 prevEl: '.p-movie__nav-item--prev', 15 }, 16 on: { 17 activeIndexChange() { 18 if (Movie.slide.instance) { 19 $('#movie').removeClass('is-play'); 20 Movie.activeIndex = Movie.slide.instance.activeIndex; 21 let _id = $('.p-movie__list-item').eq(Movie.activeIndex).attr('video-id'); 22 Movie.player.change(_id); 23 setTimeout(function () { 24 $('#movie').addClass('is-play'); 25 }, 800); 26 } 27 }, 28 slideChangeTransitionEnd() {}, 29 }, 30 }); 31 }, 32 }, 33 player: { 34 instance: null, 35 videoid: null, 36 set() { 37 Movie.player.videoid = $('.p-movie__list-item').eq(Movie.activeIndex).attr('video-id'); 38 $('#movie').addClass('is-play'); 39 this.instance = new PLAYER_MODULE_YOUTUBE({ 40 id: 'youtubePlayer', 41 videoid: Movie.player.videoid, 42 responsive: true, 43 muted: true, 44 playerVars: { 45 autoplay: 1, 46 loop: 1, 47 }, 48 on: { 49 Play: function () {}, 50 Pause: function () {}, 51 Stop: function () {}, 52 StopAll: function () {}, 53 End: function () {}, 54 Change: function () {}, 55 }, 56 }); 57 }, 58 change(id) { 59 if (Movie.player.instance) { 60 Movie.player.instance.Change(id); 61 } 62 }, 63 }, 64 init() { 65 if ($('#youtubePlayer').length) { 66 this.player.set(); 67 } 68 let _length = $('.p-movie__list-item').length; 69 if (_length === 1) { 70 $('#movie').addClass('is-nonslide'); 71 } else { 72 this.slide.set(); 73 } 74 }, 75}; 76 77document.addEventListener('DOMContentLoaded', function (event) {}); 78 79window.addEventListener('load', (event) => { 80 Op.init(); 81 Movie.init(); 82}); 83 84window.addEventListener('resize', () => {});
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.