PageSourceSearch

https://www.transporeon.com/cache-buster-1788358318/dist/youtube-player.js

js transporeon.com collected 2026-09-24 09:37:48 UTC 3,417 bytes, 1 lines download raw bytes

1import{l as p,u as y}from"./assets/helper-qsFk-eJT.js";class g{constructor(i,s){const r={showinfo:0,rel:0,color:"white",autoplay:!0,height:720,width:1280,silent:!1,fullscreen:!1,loop:!1,onCall:null,onStart:null,onResume:null,controls:1,onEnd:null,onPause:null,modestbranding:0,iv_load_policy:3,disablekb:0};this.settings=Object.assign({},r,s),this.$element=i,this.player={},this.touchDevice=window.matchMedia("(pointer: coarse)").matches;const l=setInterval(()=>{var t,n;if(typeof UC_UI<"u"){let e=(t=this.$element.closest(".swiper"))==null?void 0:t.querySelector(".uc-placeholder");e||(e=(n=this.$element.closest(".is--video"))==null?void 0:n.querySelector(".uc-placeholder")),UC_UI.getServicesBaseInfo().find(a=>a.id==="BJz7qNsdj-7").consent.status===!0?(e&&e.remove(),typeof window.YT>"u"?(p(),window.onYouTubeIframeAPIReady=()=>{this.init(),clearInterval(l)}):(this.init(),clearInterval(l))):e&&e.classList.add("is--visible")}},300)}init(){const i=this.$element.getAttribute("data-youtube"),s=window;let r=!0;const l=(t,n)=>{const e=this.$element.querySelectorAll("iframe");e.length===1&&e.remove();let a=0;n&&n===!0&&(a=1);const o=document.createElement("div");o.setAttribute("id",y()),o.className="player",this.$element.parentNode.insertBefore(o,this.$element.nextSibling),this.playerId=o.id,this.player.playing=!1,window.YT.ready(()=>{this.player.video=new window.YT.Player(o.id,{height:this.settings.height,width:this.settings.width,videoId:t,host:"https://www.youtube-nocookie.com",playerVars:{showinfo:this.settings.showinfo,rel:this.settings.rel,color:this.settings.color,fs:1,playsinline:0,autoplay:this.settings.autoplay,controls:this.settings.controls,modestbranding:this.settings.modestbranding,iv_load_policy:this.settings.iv_load_policy,disablekb:this.settings.disablekb},events:{onReady:()=>{a===1&&this.player.video.mute(),this.settings.autoplay&&this.player.video.playVideo()},onStateChange:h=>{if(h.data===1)this.player.playing===!1&&(this.$element.classList.add("playing"),typeof s.videoplayer<"u"&&s.videoplayer.playing===!0&&(s.videoplayer.video.pauseVideo(),s.videoplayer.video.playing=!1),this.player.playing=!0),r===!0?(r=!1,typeof this.settings.onStart=="function"&&this.settings.onStart(t)):typeof this.settings.onResume=="function"&&this.settings.onResume(t),s.videoplayer=this.player;else if(h.data===2){if(this.player.playing=!1,typeof this.settings.onPause=="function"){const d=parseInt(100/this.player.video.getDuration()*this.player.video.getCurrentTime());this.settings.onPause(t,d)}}else h.data===0&&(this.player.playing=!1,this.$element.classList.remove("playing"),typeof this.settings.onEnd=="function"&&this.settings.onEnd(t),this.settings.loop===!0&&(a===1&&this.player.video.mute(),this.player.video.playVideo()))}}})})};this.$element.classList.add("available"),this.$element.addEventListener("click",()=>{typeof this.settings.onCall=="function"&&this.settings.onCall(),this.settings.silent===!0&&this.player.video?(this.player.video.unMute(),this.player.silent=!0):l(i)}),!this.touchDevice&&this.settings.silent===!0&&l(i,!0)}play(){this.player.playing===!1&&this.player.video.playVideo()}pause(){this.player.playing===!0&&this.player.video.pauseVideo()}destroy(){this.player.playing=!1,this.$element.classList.remove("available"),this.$element.classList.remove("playing");const i=document.getElementById(this.playerId);typeof i<"u"&&i.remove()}}export{g as YoutubePlayer};

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.