PageSourceSearch

https://hartandholm.com/cdn/shop/t/26/assets/youtube.js?v=65638137014896701821778502809

js hartandholm.com collected 2026-10-07 03:20:21 UTC 2,504 bytes, 2 lines download raw bytes

1import{config}from"@archetype-themes/scripts/config";import{load}from"@archetype-themes/scripts/helpers/library-loader";window.onYouTubeIframeAPIReady=function(){config.youTubeReady=!0,document.dispatchEvent(new CustomEvent("youTubeReady"))};const classes={loading:"loading",loaded:"loaded",interactable:"video-interactable"},defaults={width:1280,height:720,playerVars:{autohide:0,autoplay:1,cc_load_policy:0,controls:0,fs:0,iv_load_policy:3,modestbranding:1,playsinline:1,rel:0}};export default class YouTube{constructor(divId,options){this.divId=divId,this.iframe=null,this.attemptedToPlay=!1,defaults.events={onReady:this.onVideoPlayerReady.bind(this),onStateChange:this.onVideoStateChange.bind(this)},this.options=Object.assign({},defaults,options),this.options&&(this.options.videoParent&&(this.parent=document.getElementById(this.divId).closest(this.options.videoParent)),this.options.autoplay||(this.options.playerVars.autoplay=this.options.autoplay),this.options.style==="sound"&&(this.options.playerVars.controls=1,this.options.playerVars.autoplay=0)),this.setAsLoading(),config.youTubeReady?this.init():(load("youtubeSdk"),document.addEventListener("youTubeReady",this.init.bind(this)))}init(){this.videoPlayer=new YT.Player(this.divId,this.options)}onVideoPlayerReady(evt){this.iframe=document.getElementById(this.divId),this.iframe.setAttribute("tabindex","-1"),this.options.style!=="sound"&&evt.target.mute();var observer=new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{entry.isIntersecting?this.play():this.pause()})},{rootMargin:"0px 0px 50px 0px"});observer.observe(this.iframe)}onVideoStateChange(evt){switch(evt.data){case-1:this.attemptedToPlay&&(this.setAsLoaded(),this.enableInteraction());break;case 0:this.play(evt);break;case 1:this.setAsLoaded();break;case 3:this.attemptedToPlay=!0;break}}setAsLoading(){this.parent&&this.parent.classList.add(classes.loading)}setAsLoaded(){this.parent&&(this.parent.classList.remove(classes.loading),this.parent.classList.add(classes.loaded))}enableInteraction(){this.parent&&this.parent.classList.add(classes.interactable)}play(){this.videoPlayer&&typeof this.videoPlayer.playVideo=="function"&&this.videoPlayer.playVideo()}pause(){this.videoPlayer&&typeof this.videoPlayer.pauseVideo=="function"&&this.videoPlayer.pauseVideo()}destroy(){this.videoPlayer&&typeof this.videoPlayer.destroy=="function"&&this.videoPlayer.destroy()}}
2//# sourceMappingURL=/cdn/shop/t/26/assets/youtube.js.map?v=65638137014896701821778502809

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.