PageSourceSearch

https://www.labello.com/dist/NiveaX/modules/YouTube.8979d2eb.js

js labello.com collected 2026-10-02 12:42:19 UTC 3,999 bytes, 2 lines download raw bytes

1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[5850],{39968:(e,t,i)=>{i.r(t),i.d(t,{default:()=>o});var s=i(21464);const n='[data-module="YouTube"]';class o{static setup(e=n){Array.from(document.querySelectorAll(e)).filter(e=>!e.dataset.moduleInitialized).forEach(e=>{new o(e),e.dataset.moduleInitialized="true"})}constructor(e){var t;this.element=e,this.enableClosedCaptions=this.element.hasAttribute("data-enable-closed-captions"),this.videoUrl=this.element.dataset.videoUrl,this.videoPlayBtn=this.element.querySelector(".nx-video__btn-play"),this.youTubeId=(0,s.$G)(this.videoUrl),this.iFrameContainer=this.element.querySelector(".nx-video__iframe"),this.posterFormat=["maxresdefault","sddefault","hqdefault","0"],this.consentImageUrl=this.element.dataset.consentImgUrl,this.isPortraitVideo=this.videoUrl.includes("shorts")||"True"===(null===(t=this.element.dataset)||void 0===t?void 0:t.isPortraitVideo),this.isIos=(0,s.un)(),this.counter=0,this.option={autoplay:1},this.isPortraitVideo&&this.addVideo9To16Class(),document.addEventListener("initYoutubeModule",()=>{this.removeConsentImage(),this.init()},!1),this.checkIfConsentApiIsActive()?this.getCmpYTConsent()?this.init():this.loadConsentImage():this.init()}init(){this.loadPoster(),window.NiveaX.registerIFrameVideo(this)}getCmpYTConsent(){var e,t;
1return!!(null===(t=null===(e=window.__cmp("getCMPData"))||void 0===e?void 0:e.vendorConsents)||void 0===t?void 0:t.s30)}checkIfConsentApiIsActive(){let e=!1;try{window.__cmp("consentStatus"),e=!0}catch(e){console.debug("ConsentManagerApi is Not Loaded")}return e}loadConsentImage(){this.createFallbackImage(this.consentImageUrl)}removeConsentImage(){var e;null===(e=this.element.querySelector(".nx-video__poster"))||void 0===e||e.remove()}loadPoster(e=this.posterFormat[this.counter]){if(!e||this.element.querySelector(".nx-video__poster"))return;const t=new Image;t.src=`https://img.youtube.com/vi/${this.youTubeId}/${e}.jpg`,t.addEventListener("load",e=>{this.checkPoster(e.target.naturalWidth,t)}),t.addEventListener("error",e=>{console.log(e)})}checkPoster(e,t){120===e?this.loadPoster(this.posterFormat[this.counter++]):this.appendImage(t)}createFallbackImage(e){let t=new Image,i=e||this.element.dataset.fallbackImgUrl;i&&(t.src=i),this.appendImage(t)}appendImage(e){e.className="nx-video__poster",this.iFrameContainer.childNodes.length>0?this.iFrameContainer.insertBefore(e,this.iFrameContainer.childNodes[0]):this.iFrameContainer.appendChild(e)}removeBlocker(){this.element.classList.remove("nx-video__container--blocked"),this.addPlayButtonClickListener()}addPlayButtonClickListener(){this.funcPlayButtonClick=()=>this.loadIFrame(),this.element.addEventListener("click",this.funcPlayButtonClick)}loadIFrame(){this.element.removeEventListener("click",this.funcPlayButtonClick,!1),this.videoPlayBtn.innerHTML='\n        <div class="nx-spinner nx-spinner__loading nx-spinner--medium nx-spinner--youtube">\n                <div class="nx-spinner__container ">\n                    <div class="nx-spinner__wheel"></div>\n                </div>\n        </div>',this.initPlayer()}initPlayer(){this.iFrameContainer.id="nx-video__iframe-"+this.playerId,this.player=new window.YT.Player(this.iFrameContainer.id,{videoId:this.youTubeId,height:"100%",width:"100%",host:"http://www.youtube-nocookie.com",playerVars:{autoplay:this.option.autoplay,cc_load_policy:this.enableClosedCaptions?1:0,rel:0,modestbranding:0},events:{onReady:e=>{this.autoPlayOnMobile(e)}}})}addVideo9To16Class(){var e;this.element.parentElement.classList.add("nx-video__portrait");
1const t=null===(e=this.element.closest(".nx-u-section"))||void 0===e?void 0:e.clientWidth;window.NiveaX.deviceType.isMobile&&t&&(this.element.parentElement.style.minWidth=`${t}px`)}autoPlayOnMobile({target:e}){window.NiveaX.isTouch&&e.playVideo()}pauseVideo(){this.player.pauseVideo()}playVideo(){this.player.playVideo()}}o.setup(n)}}]);
2//# sourceMappingURL=/dist/NiveaX/./modules/YouTube.8979d2eb.js.5c99b58f.map

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.