index-legacy.7f88f991.js 5.9 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._video-container_ga7yz_1{position:relative;width:100%;--plyr-color-main: #FF8057}._video-container_ga7yz_1 video{width:100%}._video-container_ga7yz_1 .video-back{position:absolute;left:.53333rem;top:.53333rem;color:#fff;z-index:99;font-size:.64rem;width:.8rem;height:.8rem;background-color:rgba(0,0,0,.5);border-radius:50%;padding:.10667rem .13333rem .10667rem .08rem}._video-container_ga7yz_1 .plyr__poster{background-size:cover}._video-container_ga7yz_1 .plyr__control--overlaid{border:.02667rem solid #fff;background-color:rgba(0,0,0,.2)!important}._video-container_ga7yz_1 .plyr--video .plyr__control:hover{background-color:transparent!important}._video-container_ga7yz_1 ._video_ga7yz_1{position:relative}._loadingVideo_ga7yz_35{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.9);z-index:10}._playOver_ga7yz_44{background:rgba(0,0,0,.5);color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}._playOver_ga7yz_44 ._tips_ga7yz_52{font-size:.4rem;color:#fff}._playOver_ga7yz_44 ._btn_ga7yz_56{margin:.26667rem 0;min-width:2.50667rem;font-size:.37333rem;height:.74667rem;line-height:.74667rem}._playOver_ga7yz_44 ._replay_ga7yz_63{padding-top:.32rem}._freeTxt_ga7yz_66{font-size:.4rem;color:#fff;line-height:.56rem;padding-top:.26667rem}._freeRate_ga7yz_72{color:#32ffd8}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./plyr.min-legacy.1dfa7bde.js","./plyr-legacy.2bfabaee.js"],(function(e){"use strict";var t,i,n,o,l,r,a,s,c,d,y,p,u,v,f;return{setters:[function(e){t=e.t,i=e.w,n=e.u,o=e.d,l=e.x,r=e.c,a=e.C,s=e.y,c=e.bm,d=e.a5,y=e.D,p=e.f,u=e.L,v=e.q},function(e){f=e.P},function(){}],execute:function(){const[g,h]=t("steps"),m={active:i(0),direction:n("horizontal"),activeIcon:n("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String},_=Symbol(g);var b=o({name:g,props:m,emits:["clickStep"],setup(e,{emit:t,slots:i}){const{linkChildren:n}=l(_);return n({props:e,onClickStep:e=>t("clickStep",e)}),()=>{var t;return r("div",{class:h([e.direction])},[r("div",{class:h("items")},[null==(t=i.default)?void 0:t.call(i)])])}}});const[z,k]=t("step");var x=o({name:z,setup(e,{slots:t}){const{parent:i,index:n}=a(_);if(!i)return void console.error("[Vant] <Step> must be a child component of <Steps>.");const o=i.props,l=()=>{const e=+o.active;return n.value<e?"finish":n.value===e?"process":"waiting"},y=()=>"process"===l(),p=s((()=>({background:"finish"===l()?o.activeColor:o.inactiveColor}))),u=s((()=>y()?{color:o.activeColor}:"waiting"===l()?{color:o.inactiveColor}:void 0)),v=()=>i.onClickStep(n.value),f=()=>{const{iconPrefix:e,finishIcon:i,activeIcon:n,activeColor:a,inactiveIcon:s}=o;return y()?t["active-icon"]?t["active-icon"]():r(d,{class:k("icon","active"),name:n,color:a,classPrefix:e},null):"finish"===l()&&(i||t["finish-icon"])?t["finish-icon"]?t["finish-icon"]():r(d,{class:k("icon","finish"),name:i,color:a,classPrefix:e},null):t["inactive-icon"]?t["inactive-icon"]():s?r(d,{class:k("icon"),name:s,classPrefix:e},null):r("i",{class:k("circle"),style:p.value},null)};return()=>{var e;const i=l();return r("div",{class:[c,k([o.direction,{[i]:i}])]},[r("div",{class:k("title",{active:y()}),style:u.value,onClick:v},[null==(e=t.default)?void 0:e.call(t)]),r("div",{class:k("circle-container"),onClick:v},[f()]),r("div",{class:k("line"),style:p.value},null)])}}});e("a",y(x)),e("S",y(b));var S="_video-container_ga7yz_1",C="_video_ga7yz_1",P="_loadingVideo_ga7yz_35";e("O",o({name:"o-video",props:{setting:{type:Object,default:()=>{}},controls:Boolean,height:String,src:{type:String,default:""},poster:{type:String,default:""},styleValue:{type:Object,default:()=>({})},preload:{type:String,default:"auto"},currentTime:{type:Boolean,default:!0},playsinline:{type:Boolean,default:!0},onPlay:{type:Function,default:()=>{}}},emits:["exitfullscreen"],data:()=>({player:null,loading:!0}),mounted(){this._init()},methods:{_init(){const e=["play-large","play","progress","captions","fullscreen"];this.currentTime&&e.push("current-time");const t={controls:e,...this.setting,invertTime:!1};p().iPhone&&(t.fullscreen={enabled:!0,fallback:"force",iosNative:!0}),this.player=new f(this.$refs.video,t),this.player.elements.container&&(this.player.elements.container.style.height=this.height||"210px"),"none"===this.preload&&(this.loading=!1),this.player.on("loadedmetadata",(()=>{this.loading=!1,this.domPlayVisibility(!1)})),this.player.on("play",(()=>{this.onPlay&&this.onPlay(this.player)})),this.player.on("enterfullscreen",(()=>{console.log("fullscreen");const e=document.createElement("i");e.id="fullscreen-back",e.className="van-icon van-icon-arrow-left video-back",e.addEventListener("click",(()=>{this.player.fullscreen.exit()})),console.log(document.getElementsByClassName("plyr")),document.getElementsByClassName("plyr")[0].appendChild(e)})),this.player.on("exitfullscreen",(()=>{console.log("exitfullscreen");const e=document.getElementById("fullscreen-back");e&&e.remove(),this.$emit("exitfullscreen")}))},domPlayVisibility(e=!0){const t=document.querySelector(".plyr__controls"),i=document.querySelector(".plyr__control--overlaid");e?(null==t||t.setAttribute("style","display:none"),null==i||i.setAttribute("style","display:none")):(null==t||t.removeAttribute("style"),setTimeout((()=>{null==i||i.removeAttribute("style")}),200))},onReplay(){this.player.restart(),this.player.play(),this.domPlayVisibility(!1)},onStop(){this.player.stop()}},unmounted(){var e;null===(e=this.player)||void 0===e||e.destroy()},render(){return r("div",{class:S},[r("video",{ref:"video",class:C,src:this.src,playsinline:this.playsinline,poster:this.poster,preload:this.preload,style:{...this.styleValue}},null),this.loading&&r("div",{class:P,style:{height:this.height||"210px"}},[r(u,{size:36,color:"#FF8057",vertical:!0,style:{height:"100%",justifyContent:"center"}},{default:()=>[v("加载中...")]})])])}}))}}}))}();