PATH:
home
/
lab2454c
/
spaxtac.com
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/*! elementor - v3.4.8 - 16-11-2021 */ (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["video"],{ /***/ "../assets/dev/js/frontend/handlers/video.js": /*!***************************************************!*\ !*** ../assets/dev/js/frontend/handlers/video.js ***! \***************************************************/ /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.default = void 0; class Video extends elementorModules.frontend.handlers.Base { getDefaultSettings() { return { selectors: { imageOverlay: '.elementor-custom-embed-image-overlay', video: '.elementor-video', videoIframe: '.elementor-video-iframe' } }; } getDefaultElements() { const selectors = this.getSettings('selectors'); return { $imageOverlay: this.$element.find(selectors.imageOverlay), $video: this.$element.find(selectors.video), $videoIframe: this.$element.find(selectors.videoIframe) }; } handleVideo() { if (this.getElementSettings('lightbox')) { return; } if ('youtube' === this.getElementSettings('video_type')) { this.apiProvider.onApiReady(apiObject => { this.elements.$imageOverlay.remove(); this.prepareYTVideo(apiObject, true); }); } else { this.elements.$imageOverlay.remove(); this.playVideo(); } } playVideo() { if (this.elements.$video.length) { // this.youtubePlayer exists only for YouTube videos, and its play function is different. if (this.youtubePlayer) { this.youtubePlayer.playVideo(); } else { this.elements.$video[0].play(); } return; } const $videoIframe = this.elements.$videoIframe, lazyLoad = $videoIframe.data('lazy-load'); if (lazyLoad) { $videoIframe.attr('src', lazyLoad); } $videoIframe[0].src = this.apiProvider.getAutoplayURL($videoIframe[0].src); } async animateVideo() { const lightbox = await elementorFrontend.utils.lightbox; lightbox.setEntranceAnimation(this.getCurrentDeviceSetting('lightbox_content_animation')); } async handleAspectRatio() { const lightbox = await elementorFrontend.utils.lightbox; lightbox.setVideoAspectRatio(this.getElementSettings('aspect_ratio')); } async hideLightbox() { const lightbox = await elementorFrontend.utils.lightbox; lightbox.getModal().hide(); } prepareYTVideo(YT, onOverlayClick) { const elementSettings = this.getElementSettings(), playerOptions = { videoId: this.videoID, events: { onReady: () => { if (elementSettings.mute) { this.youtubePlayer.mute(); } if (elementSettings.autoplay || onOverlayClick) { this.youtubePlayer.playVideo(); } }, onStateChange: event => { if (event.data === YT.PlayerState.ENDED && elementSettings.loop) { this.youtubePlayer.seekTo(elementSettings.start || 0); } } }, playerVars: { controls: elementSettings.controls ? 1 : 0, rel: elementSettings.rel ? 1 : 0, playsinline: elementSettings.play_on_mobile ? 1 : 0, modestbranding: elementSettings.modestbranding ? 1 : 0, autoplay: elementSettings.autoplay ? 1 : 0, start: elementSettings.start, end: elementSettings.end } }; // To handle CORS issues, when the default host is changed, the origin parameter has to be set. if (elementSettings.yt_privacy) { playerOptions.host = 'https://www.youtube-nocookie.com'; playerOptions.origin = window.location.hostname; } this.youtubePlayer = new YT.Player(this.elements.$video[0], playerOptions); } bindEvents() { this.elements.$imageOverlay.on('click', this.handleVideo.bind(this)); } onInit() { super.onInit(); const elementSettings = this.getElementSettings(); if (elementorFrontend.utils[elementSettings.video_type]) { this.apiProvider = elementorFrontend.utils[elementSettings.video_type]; } else { this.apiProvider = elementorFrontend.utils.baseVideoLoader; } if ('youtube' !== elementSettings.video_type) { // Currently the only API integration in the Video widget is for the YT API return; } this.videoID = this.apiProvider.getVideoIDFromURL(elementSettings.youtube_url); // If there is an image overlay, the YouTube video prep method will be triggered on click if (!this.videoID) { return; } // If the user is using an image overlay, loading the API happens on overlay click instead of on init. if (elementSettings.show_image_overlay && elementSettings.image_overlay.url) { return; } if (elementSettings.lazy_load) { this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({ callback: event => { if (event.isInViewport) { this.intersectionObserver.unobserve(this.elements.$video.parent()[0]); this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); } } }); // We observe the parent, since the video container has a height of 0. this.intersectionObserver.observe(this.elements.$video.parent()[0]); return; } // When Optimized asset loading is set to off, the video type is set to 'Youtube', and 'Privacy Mode' is set // to 'On', there might be a conflict with other videos that are loaded WITHOUT privacy mode, such as a // video bBackground in a section. In these cases, to avoid the conflict, a timeout is added to postpone the // initialization of the Youtube API object. if (!elementorFrontend.config.experimentalFeatures['e_optimized_assets_loading']) { setTimeout(() => { this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); }, 0); } else { this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); } } onElementChange(propertyName) { if (0 === propertyName.indexOf('lightbox_content_animation')) { this.animateVideo(); return; } const isLightBoxEnabled = this.getElementSettings('lightbox'); if ('lightbox' === propertyName && !isLightBoxEnabled) { this.hideLightbox(); return; } if ('aspect_ratio' === propertyName && isLightBoxEnabled) { this.handleAspectRatio(); } } } exports.default = Video; /***/ }) }]); //# sourceMappingURL=video.509fb0e07b97e0f603d7.bundle.js.map
[-] frontend.min.js
[edit]
[-] editor.js
[edit]
[-] alert.f04b9d16129bc8aa4cdc.bundle.js
[edit]
[-] progress.5306267e0436c8de4985.bundle.js
[edit]
[-] counter.1bf6011c2ab9506880c2.bundle.min.js
[edit]
[-] admin-feedback.min.js
[edit]
[-] frontend.js
[edit]
[-] alert.124c2442b8a696597f9e.bundle.min.js
[edit]
[-] kit-library.d3688acfaab28676a99c.bundle.js
[edit]
[-] tabs.b7bd957161644e810d53.bundle.js
[edit]
[-] toggle.5e8aae8d1c1e897e9b4e.bundle.js
[edit]
[-] text-editor.9efe2dca043f0f618897.bundle.min.js
[edit]
[-] image-carousel.024943eec9daaabea9ff.bundle.js
[edit]
[-] admin-top-bar.min.js
[edit]
[+]
..
[-] admin.js
[edit]
[-] accordion.5824c4bc9e26d54f2918.bundle.js
[edit]
[-] video.509fb0e07b97e0f603d7.bundle.js
[edit]
[-] admin-top-bar.js
[edit]
[-] editor-modules.min.js
[edit]
[-] image-carousel.f9dc73796adfb21bb945.bundle.min.js
[edit]
[-] gutenberg.min.js
[edit]
[-] app.min.js
[edit]
[-] app.js
[edit]
[-] text-path.9b3ece1b692d34d012b5.bundle.js
[edit]
[-] preloaded-modules.min.js
[edit]
[-] 06ad222c8807f0a951da.bundle.js
[edit]
[-] preloaded-modules.js
[edit]
[-] gutenberg.js
[edit]
[-] editor-document.js
[edit]
[-] text-path.15daa9710b97d5cf86b9.bundle.min.js
[edit]
[-] app-packages.js
[edit]
[-] common.min.js
[edit]
[-] toggle.1aca60f44e355cb43256.bundle.min.js
[edit]
[-] common-modules.min.js
[edit]
[-] common-modules.js
[edit]
[-] frontend-modules.min.js
[edit]
[-] common.js
[edit]
[-] new-template.min.js
[edit]
[-] app-loader.js
[edit]
[-] editor.min.js
[edit]
[-] elementor-admin-bar.js
[edit]
[-] elementor-admin-bar.min.js
[edit]
[-] tabs.cd05b61e107cc58d1be9.bundle.min.js
[edit]
[-] frontend-modules.js
[edit]
[-] lightbox.c3bb4b95635c5e3ad984.bundle.min.js
[edit]
[-] webpack.runtime.min.js
[edit]
[-] kit-library.e61c291a7b6bbc946eeb.bundle.min.js
[edit]
[-] app-loader.min.js
[edit]
[-] webpack.runtime.js
[edit]
[-] editor-modules.js
[edit]
[-] wp-audio.de344657de8b792ed9b0.bundle.js
[edit]
[-] video.505da250f982d8f15187.bundle.min.js
[edit]
[-] new-template.js
[edit]
[-] admin-feedback.js
[edit]
[-] text-editor.a8434931ecdcd5ff7589.bundle.js
[edit]
[-] editor-document.min.js
[edit]
[-] beta-tester.js
[edit]
[-] accordion.839112600fade8979d16.bundle.min.js
[edit]
[-] counter.b452600865ffc51a6ea0.bundle.js
[edit]
[-] progress.4079971c3240c226b858.bundle.min.js
[edit]
[-] app-packages.min.js
[edit]
[-] admin.min.js
[edit]
[-] lightbox.8c3d45f71a9a1ecd69fc.bundle.js
[edit]
[-] wp-audio.2332b719d144261993a3.bundle.min.js
[edit]
[-] beta-tester.min.js
[edit]
[-] d44a57c594ce7771dd50.bundle.min.js
[edit]