PageSourceSearch

https://www.josephjoseph.com/cdn/shop/t/651/assets/lazy-video.js?v=125076915003813740591790082415

js josephjoseph.com collected 2026-10-02 11:17:42 UTC 4,154 bytes, 13 lines download raw bytes

1const{getElement}=window.BAO.Utils;class LazyVideo extends window.BAO.CustomElement(){static get styles(){return`
2      :host {
3        display: contents;
4
5        opacity: 0;
6      
7        transition: opacity 0.5s ease;
8      }
9      :host([loaded]) {
10        opacity: 1;
11      }
12    `}connectedCallback(){super.connectedCallback(),this.video=getElement("video",{context:this}),this.observer=new IntersectionObserver(this.onEntry.bind(this),{threshold:0})}setupListeners(){super.setupListeners(),this.listeners.add(document,"DOMContentLoaded",this.onLoad.bind(this)),this.listeners.add(window,"resize",this.onResize.bind(this)),this.onPageShow=this.onPageShow.bind(this),this.onPageHide=this.onPageHide.bind(this),window.addEventListener("pageshow",this.onPageShow),window.addEventListener("pagehide",this.onPageHide)}async onLoad(){if(this.observer.observe(this.video),!this.deferVideo){if(!this.hlsSource)return;this.handleHlsVideo(this.hlsSource)}}onPageHide(event){if(this.hls)try{this.hls.stopLoad(),this.hls.detachMedia()}catch(e){console.error(e)}try{this.video&&!this.video.paused&&this.video.pause()}catch(e){console.error(e)}}onPageShow(event){if(!(!event||!event.persisted)){if(this.hls){try{this.hls.destroy()}catch(e){console.error(e)}this.hls=null}try{if(this.observer&&this.video&&this.observer.observe(this.video),this.video.dataset.hls==="true")this.handleHlsVideo(this.hlsSource);else if(this.deferVideo){for(const source of Array.from(this.video.children))source.tagName==="SOURCE"&&source.dataset.src&&(source.src=source.dataset.src);this.video.load()}}catch(e){console.error(e)}}}async onEntry([entry],observer){if(entry.isIntersecting){if(this.deferVideo&&this.video.readyState===0){if(this.video.dataset.hls==="true")for(const source of Array.from(this.video.children))source.tagName==="SOURCE"&&source.dataset.src&&(source.src=source.dataset.src),source.type==="application/x-mpegURL"&&await this.handleHlsVideo(source.src);else{if(this.video.dataset.hls==="true")await this.handleHlsVideo(this.hlsSource);else if(!this.video.src)for(const source of Array.from(this.video.children))source.tagName==="SOURCE"&&source.dataset.src&&(source.src=source.dataset.src);this.video.load()}this.setAttribute("loaded","")}this.video.paused&&!this.dataset.disableAutoplay&&this.video.loop&&this.video.play().catch(()=>{document.addEventListener("touchstart",()=>{this.video.paused&&this.video.play()},{once:!0})})}else this.video.paused||this.video.pause()}onResize(){if(this.video.dataset.hls==="true")this.handleHlsVideo(this.hlsSource);else for(const source of Array.from(this.video.children))source.type==="application/x-mpegURL"&&this.handleHlsVideo(source)}async handleHlsVideo(src){src&&(this.hls||(await import("https://cdn.jsdelivr.net/npm/hls.js@latest"),this.hls=new Hls({enableWorker:!0,capLevelToPlayerSize:!0,testBandwidth:!0,startLevel:-1,autoStartLoad:!0,maxBufferLength:2,maxMaxBufferLength:2}),src&&(this.hls.loadSource(src),this.hls.attachMedia(this.video),this.video.addEventListener("seeking",()=>{if(this.video.loop&&this.video.currentTime<.5&&this.hls){const currentLevel=this.hls.currentLevel,maxLevel=this.hls.levels.length-1;currentLevel!==-1&&currentLevel<maxLevel&&(this.hls.currentLevel=-1)}}),this.dataset.waitforinteraction==="true"?new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&this.video.play()})},{threshold:.7}).observe(this.video):this.dataset.displayCustomVideoControls==="true"?(this.video.pause(),this.videoControls=getElement(".rsp-Image_CustomControls",{context:this}),this.videoControls.addEventListener("click",()=>{this.video.muted=!1,this.video.loop=!1,this.video.play(),this.videoControls.classList.add("rsp-Image_CustomControls-Hide")})):this.hls.on(Hls.Events.MANIFEST_PARSED,()=>{(typeof this.video.checkVisibility!="function"||this.video.checkVisibility())&&this.video.play()}))))}get deferVideo(){return this.dataset.defer==="true"}get hlsSource(){return this.video.dataset.src}}customElements.get("lazy-video")||customElements.define("lazy-video",LazyVideo);
13//# sourceMappingURL=/cdn/shop/t/651/assets/lazy-video.js.map?v=125076915003813740591790082415

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.