!function(){function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function t(t){for(var n=1;n'})),e},this.player=y(this.videoID,{appID:"",controls:!0}),this._init(),n("setVideoPlayer",(function(t){"pause"===(null==t?void 0:t.content).status&&e.player.pause()}))},beforeUnmount:function(){o({api:"limitScreenRecord",content:{type:0}})},computed:{computedSeeStatus:function(){return this.showSeeStatus&&this.trySee},playTime:function(){var e=this.player.duration()*this.freeRate/100;return e||0}},methods:{_init:function(){var e=this;this.player&&this.src&&(this.player.src(this.src),this.player.poster(this.poster||""),"none"===this.preload&&(this.loading=!1),this.player.on("loadstart",(function(){e.loading=!1,e.trySee?e.domPlayVisibility():e.domPlayVisibility(!1),e.player.on("timeupdate",(function(){var t=e.player;t.currentTime()>=e.playTime&&e.trySee&&(t.pause(),e.trySeeOver=!0,e.showSeeStatus=!0,e.domPlayVisibility())}))})),this.player.on("play",(function(){o({api:"getDeviceStatus",content:{type:"video"}},(function(t){"1"==t.content.status&&(d("为了保证数据安全,请不要录屏"),e.player.pause())})),o({api:"limitScreenRecord",content:{type:1}}),e.onPlay&&e.onPlay()})),this.player.on("fullscreenchange",(function(){if(e.player.isFullscreen()){console.log("fullscreen");var t=document.createElement("i");t.id="fullscreen-back",t.className="van-icon van-icon-arrow-left video-back",t.addEventListener("click",(function(){e.player.exitFullscreen()})),document.getElementsByClassName("video-js")[0].appendChild(t)}else{console.log("exitfullscreen");var i=document.getElementById("fullscreen-back");i&&i.remove()}})))},domPlayVisibility:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".vjs-big-play-button"),i=document.querySelector(".vjs-control-bar");e?(null==t||t.setAttribute("style","display:none"),null==i||i.setAttribute("style","display:none")):(null==t||t.removeAttribute("style"),setTimeout((function(){null==i||i.removeAttribute("style")}),200))},onClickPlay:function(){this.player.play(),this.domPlayVisibility(!1),this.showSeeStatus=!1},onBuy:function(){this.isBuy?this.onBuyEmit():this.$router.back()},onReplay:function(){this.player.currentTime(0),this.player.play(),this.domPlayVisibility(!1),this.trySeeOver=!1,this.showSeeStatus=!1}},unmounted:function(){var e,t,i;null===(e=this.player)||void 0===e||e.pause(),null===(t=this.player)||void 0===t||t.src(""),null===(i=this.player)||void 0===i||i.dispose()},render:function(){var e=this;return r("div",{class:[f,"colVideo"],style:{height:this.height||"210px"}},[r("video",{ref:"video",class:v,src:this.src,id:this.videoID,playsinline:this.playsinline,poster:this.poster,preload:this.preload,style:t({},this.styleValue)},null),this.loading&&r("div",{class:h,style:{height:this.height||"210px"}},[r(l,{size:36,color:"#2dc7aa",vertical:!0,style:{height:"100%",justifyContent:"center"}},{default:function(){return[a("加载中...")]}})]),this.trySee&&this.computedSeeStatus&&!this.loading&&r("div",{class:[h,m],style:{height:this.height||"210px"}},[this.trySeeOver?r(s,null,["STUDENT"===c.platformType?r("p",{class:g},[this.freeTitleStatus?"免费试看结束,购买完整课程后继续学习":"试看结束,领取课程后继续学习"]):r("p",{class:g},[a("若需完整观看,请下载酷乐秀领取或购买")]),"STUDENT"===c.platformType&&r(p,{class:_,type:"primary",round:!0,size:"small",onClick:this.onBuy},{default:function(){return["STUDENT"===c.platformType?e.freeTitleStatus?"立即购买":"免费领取":"返回免费"]}}),r("div",{class:"STUDENT"!==c.platformType&&b,onClick:this.onReplay},[r(u,{name:"replay",style:{marginRight:"5px"},size:16},null),a("重播")])]):r(s,null,[r(u,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAABSCAMAAADw8nOpAAAAAXNSR0IArs4c6QAAAapQTFRFAAAA////////////2NjY2dnZ9vb2////9vb23Nzc3d3d3t7e39/f////4+Pj4+Pj6+vr7Ozs5+fn6Ojo7u7u6enp6enp7+/v8fHx7Ozs8fHx7e3t7+/v8/Pz8PDw8/Pz9PT0+/v78PDw8PDw9PT09PT0////9fX1/Pz89fX19fX19fX18vLy/Pz89vb29vb2/Pz8+fn59/f3////9/f3+vr69/f3+vr6////+Pj4+/v7////+/v7+/v7+Pj4+fn5/////f39+/v7+/v7+/v7+fn5+/v7+/v7/f39////+/v7////+/v7/f39/Pz8/Pz8/////Pz8/////Pz8/f39/f39/Pz8/f39/v7+/Pz8/v7+/////Pz8/v7+/v7+/v7+/v7+/Pz8/v7+/////v7+/v7+/v7+/v7+/v7+/v7+/////v7+/v7+/v7+/////v7+/////v7+/v7+/////v7+/////v7+/////////////////v7+/////v7+/////////////v7+/////////////////////v7+////////////////////////lZ+FUgAAAI10Uk5TAAYSFRobGxscHR4fICMkJScpKywsLi8vNTY2OD5BQkJDQ0RGRkhISktMTlBRUlNVWFlbXF1gY29wcXJyc3R1d3p7fH+AgoSFhoaHj5CTlJWXmJifn6WoqKusr6+0tLi5ury/v8LDyMvMzdTV1tjY2trb3ODh4eLj5ejs7e3u7u/w8vT19vj5+vr7/P3+n1NMJwAAA5RJREFUWMO1metfEkEUhg86lrZZRBeVitJSsVIkKym7KFqYqJGXLiplCWUYBKllRiaQa7Lz/s998Bqyu7ML+37eeX47t3Pec4ZIR9VuX2gutpSW5fRSbC7kc1dTKaroHEtyFIgnxzorzPFs7VMbADLRCb/X5XRIksPp8vonohkAG1PtNsPAysFVIB8JtNawAtW0BiJ5YHWw0hDwaDALxAbqmIrqBmJANnhEfMq9OfDZNqaptlmOXK/g9Bvj4DNNTFdNMxzxRpFfHOFIeZiQPCnwEd0frZ2HPCQxQUlDMuZrtYkt61hsZgbUvIj1Fi1i1ybCdmZI9jA2u9SJPQpGmWGNQulRJULpZybUr0CF2aUo3cyUuhWl6NxbNtHPTKofm0X2qHbdzDrur+f6obNkm0eYlaAw5gvP/AgW7aUg7YsYKbjXXG5mJalZ5v/dd1sCQ6xEDSFxcOp9SEmlIqUU+g5E3Bz3sJLl4bn9mBzEDCuDZhDcyzNZrhpxT104Loxs4tndfDSIWbX1mdzCr8fHRJmzGNzZ7lWo5ZlhAMD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