PageSourceSearch

https://www.shopmelissa.com/cdn/shop/t/983/assets/video-player.js?v=103078134950171852231790253522

js shopmelissa.com collected 2026-09-25 19:38:28 UTC 2,504 bytes, 2 lines download raw bytes

1export class VideoPlayer extends HTMLElement{#plyr=null;get host(){return this.dataset.host||"html"}connectedCallback(){this.#initPlayer()}disconnectedCallback(){this.#destroyPlayer()}#initPlayer(){const targetElement=this.host==="html"?this.querySelector("video"):this.querySelector('[data-ref="plyrEmbed"]');if(!targetElement)return;const autoplayIntent=this.#resolveAutoplayIntent(targetElement),hasControls=this.#resolveControlsIntent(targetElement),options=this.#buildPlyrOptions(targetElement);this.#plyr=new Plyr(targetElement,{...options,autoplay:!1,controls:hasControls?options.controls:[]}),this.#plyr.on("ready",()=>this.#applyAutoplayIntent(autoplayIntent))}#destroyPlayer(){this.#plyr?.destroy(),this.#plyr=null}#buildPlyrOptions(targetElement){const trackElement=targetElement.querySelector('track[kind="captions"]'),hasCaptions=trackElement!==null,merchantConfig=this.#parseConfigAttribute(),baseControls=["play","progress","current-time","mute",...hasCaptions?["captions"]:[]],captionsConfig=hasCaptions?{captions:{active:!0,language:trackElement.srclang||"auto",update:!0}}:{};return{playsinline:!0,hideControls:!1,controls:baseControls,...captionsConfig,...merchantConfig,storage:{enabled:!1}}}#parseConfigAttribute(){const rawConfig=this.dataset.plyrConfig;if(!rawConfig)return{};try{return JSON.parse(rawConfig)}catch{return{}}}#resolveAutoplayIntent(targetElement){if(this.host==="html"){const shouldAutoplay=targetElement.hasAttribute("autoplay"),shouldMute=targetElement.hasAttribute("muted");return targetElement.removeAttribute("autoplay"),targetElement.removeAttribute("muted"),{shouldAutoplay,shouldMute}}const iframeSrc=targetElement.querySelector("iframe")?.src??"";return{shouldAutoplay:iframeSrc.includes("autoplay=1"),shouldMute:iframeSrc.includes("mute=1")||iframeSrc.includes("background=1")}}#applyAutoplayIntent({shouldAutoplay,shouldMute}){shouldMute&&(this.#plyr.muted=!0,this.#plyr.volume=0),shouldAutoplay&&this.#plyr.play()}#resolveControlsIntent(targetElement){if(this.host==="html"){const hasControls=targetElement.hasAttribute("controls");return targetElement.removeAttribute("controls"),hasControls}return(targetElement.querySelector("iframe")?.src??"").includes("controls=1")}play(){this.#plyr?.play()}pause(){this.#plyr?.pause()}get paused(){return this.#plyr?.paused??!0}}customElements.get("video-player")||customElements.define("video-player",VideoPlayer);
2//# sourceMappingURL=/cdn/shop/t/983/assets/video-player.js.map?v=103078134950171852231790253522

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.