packages
2 years ago
081ef1d595d61b745bca.bundle.min.js
2 years ago
081ef1d595d61b745bca.bundle.min.js.LICENSE.txt
2 years ago
1bef795bdeaafc779b19.bundle.min.js
2 years ago
46e544e5863270fc32f2.bundle.js
2 years ago
4fdaa70e951ad90db2f2.bundle.min.js
2 years ago
6dc72ebebb42e6117899.bundle.min.js
2 years ago
6ed74dd3befaff90b65c.bundle.js
2 years ago
79d91b3af4aa6bc1c967.bundle.min.js
2 years ago
906cf49fecec599e1a67.bundle.min.js
2 years ago
a493d490206d9432cc8b.bundle.js
2 years ago
a730ee9caa710006b307.bundle.js
2 years ago
ab59172d5784d868ebd9.bundle.min.js
2 years ago
accordion.8799675460c73eb48972.bundle.min.js
2 years ago
accordion.c16b88b2e8a0c50189bc.bundle.js
2 years ago
admin-feedback.js
2 years ago
admin-feedback.min.js
2 years ago
admin-modules.js
2 years ago
admin-modules.min.js
2 years ago
admin-modules.min.js.LICENSE.txt
3 years ago
admin-top-bar.js
2 years ago
admin-top-bar.min.js
2 years ago
admin.js
2 years ago
admin.min.js
2 years ago
admin.min.js.LICENSE.txt
3 years ago
ai-admin.js
2 years ago
ai-admin.min.js
2 years ago
ai-admin.min.js.LICENSE.txt
3 years ago
ai.js
2 years ago
ai.min.js
2 years ago
ai.min.js.LICENSE.txt
3 years ago
alert.c3c6a3fdf4745bd26b7f.bundle.js
2 years ago
alert.cbc2a0fee74ee3ed0419.bundle.min.js
2 years ago
announcements-app.js
2 years ago
announcements-app.min.js
2 years ago
announcements-app.min.js.LICENSE.txt
3 years ago
app-loader.js
2 years ago
app-loader.min.js
2 years ago
app-packages.js
2 years ago
app-packages.min.js
2 years ago
app-packages.min.js.LICENSE.txt
3 years ago
app.js
2 years ago
app.min.js
2 years ago
app.min.js.LICENSE.txt
3 years ago
be69c0d71c69e96d6a96.bundle.min.js
2 years ago
beta-tester.js
2 years ago
beta-tester.min.js
2 years ago
c1dd514ac8d43fbb6919.bundle.js
2 years ago
common-modules.js
2 years ago
common-modules.min.js
2 years ago
common.js
2 years ago
common.min.js
2 years ago
common.min.js.LICENSE.txt
3 years ago
container-converter.js
2 years ago
container-converter.min.js
2 years ago
container.284c9bf9b36eadd05080.bundle.min.js
2 years ago
container.dfea7c883442d5ae61c8.bundle.js
2 years ago
counter.02cef29c589e742d4c8c.bundle.min.js
2 years ago
counter.3f74a246dff765f39aea.bundle.js
2 years ago
d3bdd130eb38d3b07f85.bundle.js
2 years ago
d6220da5189e9a2aac43.bundle.js
2 years ago
dev-tools.js
2 years ago
dev-tools.min.js
2 years ago
e8a7573e654d921656ab.bundle.js
2 years ago
editor-document.js
2 years ago
editor-document.min.js
2 years ago
editor-environment-v2.js
2 years ago
editor-environment-v2.min.js
2 years ago
editor-loader-v1.js
2 years ago
editor-loader-v1.min.js
2 years ago
editor-loader-v2.js
2 years ago
editor-loader-v2.min.js
2 years ago
editor-modules.js
2 years ago
editor-modules.min.js
2 years ago
editor-modules.min.js.LICENSE.txt
3 years ago
editor.js
2 years ago
editor.min.js
2 years ago
editor.min.js.LICENSE.txt
3 years ago
elementor-admin-bar.js
2 years ago
elementor-admin-bar.min.js
2 years ago
f9b37afff6a65f7b9541.bundle.js
2 years ago
frontend-modules.js
2 years ago
frontend-modules.min.js
2 years ago
frontend.js
2 years ago
frontend.min.js
2 years ago
gutenberg.js
2 years ago
gutenberg.min.js
2 years ago
image-carousel.4455c6362492d9067512.bundle.min.js
2 years ago
image-carousel.9399f19d95d7300cbc2e.bundle.js
2 years ago
import-export-admin.js
2 years ago
import-export-admin.min.js
2 years ago
kit-elements-defaults-editor.js
2 years ago
kit-elements-defaults-editor.min.js
2 years ago
kit-elements-defaults-editor.min.js.LICENSE.txt
3 years ago
kit-library.26f1573ff46203710889.bundle.min.js
2 years ago
kit-library.b4cf9f541e44f7bbc972.bundle.js
2 years ago
lightbox.1b6e05e0607040eb8929.bundle.min.js
2 years ago
lightbox.c35dbfc7181d730b570c.bundle.js
2 years ago
nested-accordion.js
2 years ago
nested-accordion.min.js
2 years ago
nested-accordion.min.js.LICENSE.txt
3 years ago
nested-elements.js
2 years ago
nested-elements.min.js
2 years ago
nested-tabs.js
2 years ago
nested-tabs.min.js
2 years ago
nested-tabs.min.js.LICENSE.txt
3 years ago
new-template.js
2 years ago
new-template.min.js
2 years ago
notes.js
2 years ago
notes.min.js
2 years ago
onboarding.c7161864bbc938281940.bundle.min.js
2 years ago
onboarding.d1f3b86a6e269191f707.bundle.js
2 years ago
preloaded-modules.js
2 years ago
preloaded-modules.min.js
2 years ago
progress.553d43a5b3903206bedc.bundle.js
2 years ago
progress.ca55d33bb06cee4e6f02.bundle.min.js
2 years ago
responsive-bar.js
2 years ago
responsive-bar.min.js
2 years ago
styleguide-app-initiator.js
2 years ago
styleguide-app-initiator.min.js
2 years ago
styleguide-app-initiator.min.js.LICENSE.txt
3 years ago
styleguide.js
2 years ago
styleguide.min.js
2 years ago
tabs.520bc2ed4560c561029e.bundle.js
2 years ago
tabs.c2af5be7f9cb3cdcf3d5.bundle.min.js
2 years ago
text-editor.2c35aafbe5bf0e127950.bundle.min.js
2 years ago
text-editor.2f2f7e0ea1e16387a004.bundle.js
2 years ago
text-path.b50b3e74488a4e302613.bundle.min.js
2 years ago
text-path.bfa8a1f6fcf6c803aaa9.bundle.js
2 years ago
toggle.31881477c45ff5cf9d4d.bundle.min.js
2 years ago
toggle.d79746a764407a0828ee.bundle.js
2 years ago
video.bb330f394f46f2666bc1.bundle.js
2 years ago
video.fea4f8dfdf17262f23e8.bundle.min.js
2 years ago
web-cli.js
2 years ago
web-cli.min.js
2 years ago
web-cli.min.js.LICENSE.txt
3 years ago
webpack.runtime.js
2 years ago
webpack.runtime.min.js
2 years ago
wp-audio.75f0ced143febb8cd31a.bundle.min.js
2 years ago
wp-audio.b8efdc046bc9df72a075.bundle.js
2 years ago
video.bb330f394f46f2666bc1.bundle.js
192 lines
| 1 | /*! elementor - v3.16.0 - 07-09-2023 */ |
| 2 | "use strict"; |
| 3 | (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["video"],{ |
| 4 | |
| 5 | /***/ "../assets/dev/js/frontend/handlers/video.js": |
| 6 | /*!***************************************************!*\ |
| 7 | !*** ../assets/dev/js/frontend/handlers/video.js ***! |
| 8 | \***************************************************/ |
| 9 | /***/ ((__unused_webpack_module, exports) => { |
| 10 | |
| 11 | |
| 12 | |
| 13 | Object.defineProperty(exports, "__esModule", ({ |
| 14 | value: true |
| 15 | })); |
| 16 | exports["default"] = void 0; |
| 17 | class Video extends elementorModules.frontend.handlers.Base { |
| 18 | getDefaultSettings() { |
| 19 | return { |
| 20 | selectors: { |
| 21 | imageOverlay: '.elementor-custom-embed-image-overlay', |
| 22 | video: '.elementor-video', |
| 23 | videoIframe: '.elementor-video-iframe', |
| 24 | playIcon: '.elementor-custom-embed-play' |
| 25 | } |
| 26 | }; |
| 27 | } |
| 28 | getDefaultElements() { |
| 29 | const selectors = this.getSettings('selectors'); |
| 30 | return { |
| 31 | $imageOverlay: this.$element.find(selectors.imageOverlay), |
| 32 | $video: this.$element.find(selectors.video), |
| 33 | $videoIframe: this.$element.find(selectors.videoIframe), |
| 34 | $playIcon: this.$element.find(selectors.playIcon) |
| 35 | }; |
| 36 | } |
| 37 | handleVideo() { |
| 38 | if (this.getElementSettings('lightbox')) { |
| 39 | return; |
| 40 | } |
| 41 | if ('youtube' === this.getElementSettings('video_type')) { |
| 42 | this.apiProvider.onApiReady(apiObject => { |
| 43 | this.elements.$imageOverlay.remove(); |
| 44 | this.prepareYTVideo(apiObject, true); |
| 45 | }); |
| 46 | } else { |
| 47 | this.elements.$imageOverlay.remove(); |
| 48 | this.playVideo(); |
| 49 | } |
| 50 | } |
| 51 | playVideo() { |
| 52 | if (this.elements.$video.length) { |
| 53 | // This.youtubePlayer exists only for YouTube videos, and its play function is different. |
| 54 | if (this.youtubePlayer) { |
| 55 | this.youtubePlayer.playVideo(); |
| 56 | } else { |
| 57 | this.elements.$video[0].play(); |
| 58 | } |
| 59 | return; |
| 60 | } |
| 61 | const $videoIframe = this.elements.$videoIframe, |
| 62 | lazyLoad = $videoIframe.data('lazy-load'); |
| 63 | if (lazyLoad) { |
| 64 | $videoIframe.attr('src', lazyLoad); |
| 65 | } |
| 66 | $videoIframe[0].src = this.apiProvider.getAutoplayURL($videoIframe[0].src); |
| 67 | } |
| 68 | async animateVideo() { |
| 69 | const lightbox = await elementorFrontend.utils.lightbox; |
| 70 | lightbox.setEntranceAnimation(this.getCurrentDeviceSetting('lightbox_content_animation')); |
| 71 | } |
| 72 | async hideLightbox() { |
| 73 | const lightbox = await elementorFrontend.utils.lightbox; |
| 74 | lightbox.getModal().hide(); |
| 75 | } |
| 76 | prepareYTVideo(YT, onOverlayClick) { |
| 77 | const elementSettings = this.getElementSettings(), |
| 78 | playerOptions = { |
| 79 | videoId: this.videoID, |
| 80 | events: { |
| 81 | onReady: () => { |
| 82 | if (elementSettings.mute) { |
| 83 | this.youtubePlayer.mute(); |
| 84 | } |
| 85 | if (elementSettings.autoplay || onOverlayClick) { |
| 86 | this.youtubePlayer.playVideo(); |
| 87 | } |
| 88 | }, |
| 89 | onStateChange: event => { |
| 90 | if (event.data === YT.PlayerState.ENDED && elementSettings.loop) { |
| 91 | this.youtubePlayer.seekTo(elementSettings.start || 0); |
| 92 | } |
| 93 | } |
| 94 | }, |
| 95 | playerVars: { |
| 96 | controls: elementSettings.controls ? 1 : 0, |
| 97 | rel: elementSettings.rel ? 1 : 0, |
| 98 | playsinline: elementSettings.play_on_mobile ? 1 : 0, |
| 99 | modestbranding: elementSettings.modestbranding ? 1 : 0, |
| 100 | autoplay: elementSettings.autoplay ? 1 : 0, |
| 101 | start: elementSettings.start, |
| 102 | end: elementSettings.end |
| 103 | } |
| 104 | }; |
| 105 | |
| 106 | // To handle CORS issues, when the default host is changed, the origin parameter has to be set. |
| 107 | if (elementSettings.yt_privacy) { |
| 108 | playerOptions.host = 'https://www.youtube-nocookie.com'; |
| 109 | playerOptions.origin = window.location.hostname; |
| 110 | } |
| 111 | this.youtubePlayer = new YT.Player(this.elements.$video[0], playerOptions); |
| 112 | } |
| 113 | bindEvents() { |
| 114 | this.elements.$imageOverlay.on('click', this.handleVideo.bind(this)); |
| 115 | this.elements.$playIcon.on('keydown', event => { |
| 116 | const playKeys = [13, |
| 117 | // Enter key. |
| 118 | 32 // Space bar key. |
| 119 | ]; |
| 120 | |
| 121 | if (playKeys.includes(event.keyCode)) { |
| 122 | this.handleVideo(); |
| 123 | } |
| 124 | }); |
| 125 | } |
| 126 | onInit() { |
| 127 | super.onInit(); |
| 128 | const elementSettings = this.getElementSettings(); |
| 129 | if (elementorFrontend.utils[elementSettings.video_type]) { |
| 130 | this.apiProvider = elementorFrontend.utils[elementSettings.video_type]; |
| 131 | } else { |
| 132 | this.apiProvider = elementorFrontend.utils.baseVideoLoader; |
| 133 | } |
| 134 | if ('youtube' !== elementSettings.video_type) { |
| 135 | // Currently the only API integration in the Video widget is for the YT API |
| 136 | return; |
| 137 | } |
| 138 | this.videoID = this.apiProvider.getVideoIDFromURL(elementSettings.youtube_url); |
| 139 | |
| 140 | // If there is an image overlay, the YouTube video prep method will be triggered on click |
| 141 | if (!this.videoID) { |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | // If the user is using an image overlay, loading the API happens on overlay click instead of on init. |
| 146 | if (elementSettings.show_image_overlay && elementSettings.image_overlay.url) { |
| 147 | return; |
| 148 | } |
| 149 | if (elementSettings.lazy_load) { |
| 150 | this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({ |
| 151 | callback: event => { |
| 152 | if (event.isInViewport) { |
| 153 | this.intersectionObserver.unobserve(this.elements.$video.parent()[0]); |
| 154 | this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); |
| 155 | } |
| 156 | } |
| 157 | }); |
| 158 | |
| 159 | // We observe the parent, since the video container has a height of 0. |
| 160 | this.intersectionObserver.observe(this.elements.$video.parent()[0]); |
| 161 | return; |
| 162 | } |
| 163 | |
| 164 | // When Optimized asset loading is set to off, the video type is set to 'Youtube', and 'Privacy Mode' is set |
| 165 | // to 'On', there might be a conflict with other videos that are loaded WITHOUT privacy mode, such as a |
| 166 | // video bBackground in a section. In these cases, to avoid the conflict, a timeout is added to postpone the |
| 167 | // initialization of the Youtube API object. |
| 168 | if (!elementorFrontend.config.experimentalFeatures.e_optimized_assets_loading) { |
| 169 | setTimeout(() => { |
| 170 | this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); |
| 171 | }, 0); |
| 172 | } else { |
| 173 | this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject)); |
| 174 | } |
| 175 | } |
| 176 | onElementChange(propertyName) { |
| 177 | if (0 === propertyName.indexOf('lightbox_content_animation')) { |
| 178 | this.animateVideo(); |
| 179 | return; |
| 180 | } |
| 181 | const isLightBoxEnabled = this.getElementSettings('lightbox'); |
| 182 | if ('lightbox' === propertyName && !isLightBoxEnabled) { |
| 183 | this.hideLightbox(); |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | exports["default"] = Video; |
| 188 | |
| 189 | /***/ }) |
| 190 | |
| 191 | }]); |
| 192 | //# sourceMappingURL=video.bb330f394f46f2666bc1.bundle.js.map |