import{T as a}from"./tcplayer.v4.8.0.min-bea4b434.js";/* empty css */const u="_contentBody_1o1vc_60",_="_cbTitle_1o1vc_67",B="_hideContent_1o1vc_78",m="_videoBoxCon_1o1vc_81",x="_videoBox_1o1vc_81",y="_coverImg_1o1vc_102",h="_video_1o1vc_9",k="_loadingVideo_1o1vc_156",C="_bottomBtn_1o1vc_165",b="_nextBtn_1o1vc_181",I={"intention-page":"_intention-page_1o1vc_1","content-box":"_content-box_1o1vc_57",contentBody:u,cbTitle:_,hideContent:B,videoBoxCon:m,videoBox:x,"video-content":"_video-content_1o1vc_92",coverImg:y,video:h,loadingVideo:k,bottomBtn:C,nextBtn:b},L=(n,o,t)=>{let e=n==="one"?o.player1:o.player2;const r=n==="one"?o.introductionVideo:o.introductionVideo2,v=n==="one"?o.coverImg:o.coverImg2;let s=n==="one"?o.playerSpeed1:o.playerSpeed2;n==="one"?o.videoLoading1:o.videoLoading2;const d=n==="one"?"register-video":"register-video2",g=a.getComponent("Button"),p=a.getComponent("BigPlayButton");if(p.prototype.createEl=function(){const c=g.prototype.createEl.call(this),l='';return c.appendChild(a.dom.createEl("div",{className:"vjs-button-icon",innerHTML:l})),c},e=a(d,{appID:"",controls:!0,plugins:{}}),e){e.src(r),e.poster(v||""),e.on("ready",l=>{console.log("ready",l)}),e.on("loadedmetadata",()=>{console.log("loadedmetadata"),n==="one"?o.videoLoading1=!1:o.videoLoading2=!1}),e.on("ratechange",()=>{s=s{console.log("seeking"),t.isActive.value&&t.pause()}),e.on("seeked",()=>{console.log("seeked"),t.isActive.value&&t.pause()}),e.on("waiting",()=>{t.isActive.value&&t.pause()}),e.on("timeupdate",()=>{!t.isActive.value&&e.currentTime()>0&&!e.paused()&&t.resume()}),e.on("ended",()=>{e.pause()}),e.on("play",()=>{e.id()==="register-video"&&o.player2.pause(),e.id()==="register-video2"&&o.player1.pause(),t.resume()}),e.on("pause",()=>{t.pause()});let c=!1;return e.on("fullscreenchange",()=>{var l;if(console.log("fullscreen fullscreenchange",e.isFullscreen()),c){c=!1;const i=document.getElementById("fullscreen-back");i&&i.remove()}else{c=!0;const i=document.createElement("i");i.id="fullscreen-back",i.className="van-icon van-icon-arrow-left video-back",i.addEventListener("click",()=>{e.exitFullscreen()}),(l=document.getElementById(d))==null||l.appendChild(i)}}),e}};export{L as _,I as s};