1import{h as C,q as v,f as a,a$ as S,m as I,o as k,n as V}from"./DOlF5RNE.js";function _(e){return e?Object.entries(e).reduce((l,[t,r])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...l,[t]:r}),{}):null}function B(e,l={},t){const{props:r,domProps:i,on:u,attrs:n,...o}=l,d=_(u),c={...o,...r,...i,...d,...n};return S(e,c,t)}var s=B;function p(e,l){var t;if(e===null)throw new Error("iframe element not instantiated.");(t=e.contentWindow)==null||t.postMessage(`{"event":"command","func":"${l}","args":""}`,"*")}function f(e){return s("link",{attrs:{rel:"preconnect",href:e}})}var N=C({props:{announce:{type:String,required:!1,default:"Watch"},id:{type:String,required:!0},title:{type:String,required:!0},activatedClass:{type:String,required:!1,default:"lyt-activated"},adNetwork:{type:Boolean,required:!1,default:!0},iframeClass:{type:String,required:!1,default:""},cookie:{type:Boolean,required:!1,default:!1},params:{type:String,required:!1,default:""},playerClass:{type:String,required:!1,default:"lty-playbtn"},playlist:{type:Boolean,required:!1,default:!1},playlistCoverId:{type:String,required:!1,default:""},poster:{type:String,required:!1,default:"hqdefault"},wrapperClass:{type:String,required:!1,default:"yt-lite"},muted:{type:Boolean,required:!1,default:!1},thumbnail:{type:String,required:!1},webp:{type:Boolean,required:!1,default:!1},rel:{type:String,required:!1,default:"preload"},aspectHeight:{type:Number,required:!1,default:9},aspectWidth:{type:Number,required:!1,default:16}},emits:["iframeAdded"],setup(e,{emit:l,expose:t}){const r=v(!1),i=v(!1),u=v(null),n=a(()=>encodeURIComponent(e.id)),o=a(()=>`&${e.params}`||""),d=a(()=>e.muted?"&mute=1":""),c=a(()=>e.webp?"webp":"jpg"),y=a(()=>e.webp?"vi_webp":"vi"),$=a(()=>typeof e.playlistCoverId=="string"?encodeURIComponent(e.playlistCoverId):null),g=a(()=>e.thumbnail||(e.playlist?`https://i.ytimg.com/${y.value}/${$.value}/${e.poster}.${c.value}`:`https://i.ytimg.com/${y.value}/${n.value}/${e.poster}.${c.value}`)),m=a(()=>e.cookie?"https://www.youtube.com":"https://www.youtube-nocookie.com"),w=a(()=>e.playlist?`${m.value}/embed/videoseries?autoplay=1&enablejsapi=1&list=${n.value}${d.value}${o.value}`:`${m.value}/embed/${n.value}?autoplay=1&enablejsapi=1&state=1${d.value}${o.value}`);function b(){i.value||(i.value=!0,l("iframeAdded"))}function h(){r.value||(r.value=!0)}t({getPlayerInstance(){return u.value},stopVideo(){p(u.value,"stopVideo")},pauseVideo(){p(u.value,"pauseVideo")},playVideo(){p(u.value,"playVideo")},warmConnections:h,addIframe:b});const q=()=>[s("link",{attrs:{rel:e.rel,href:g.value,as:"image"}}),r.value?f(m.value):null,r.value?f("https://www.google.com"):null,e.adNetwork?f("https://static.doubleclick.net"):null,e.adNetwork?f("https://googleads.g.doubleclick.net"):null,s("article",{on:{pointerover:h,click:b},class:`${e.wrapperClass} ${i.value?e.activatedClass:""}`,attrs:{"data-title":e.title},style:{backgroundImage:`url(${g.value})`,"--aspect-ratio":`${e.aspectHeight/e.aspectWidth*100}%`}},[s("button",{class:e.playerClass,attrs:{type:"button","aria-label":`${e.announce} ${e.title}`}}),i.value?s("iframe",{ref:u,class:e.iframeClass,attrs:{title:e.title,width:560,height:315,frameborder:0,allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0,src:w.value}}):null])];return()=>q()}}),U=N;/*! 2 * Original code by Ibrahim Cesar 3 * MIT Licensed, Copyright 2022 Ibrahim Cesar, see https://github.com/ibrahimcesar/react-lite-youtube-embed/blob/main/LICENSE for details 4 * 5 * Credits to the team: 6 * https://github.com/ibrahimcesar/react-lite-youtube-embed/blob/main/src/lib/index.tsx 7 */const P={__name:"YoutubeVideo",props:["id","title","cover"],setup(e){return(l,t)=>(k(),I(V(U),{id:e.id,params:"controls=1&rel=0&hl=de&cc_load_policy=0",title:e.title,thumbnail:e.cover},null,8,["id","title","thumbnail"]))}};export{P as default};
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.