1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,i,o,a){try{var l=e[o](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function l(e){r(a,i,o,l,s,"next",e)}function s(e){r(a,i,o,l,s,"throw",e)}l(void 0)}))}}var o=document.createElement("style");o.innerHTML="._video-container_yk4kf_1{position:relative;width:100%;--plyr-color-main: #01c1b5}._video-container_yk4kf_1 video{width:100%}._video-container_yk4kf_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_yk4kf_1 .plyr__poster{background-size:cover}._video-container_yk4kf_1 .plyr__control--overlaid{border:.02667rem solid #fff;background-color:transparent!important}._video-container_yk4kf_1 .plyr--video .plyr__control:hover{background-color:transparent!important}._video-container_yk4kf_1 .video-js{width:100%;height:100%}._video-container_yk4kf_1 .tcp-skin .vjs-play-progress{background-color:var(--van-primary)!important}._video-container_yk4kf_1 .vjs-poster{background-size:cover}._video-container_yk4kf_1 .video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:inherit!important;outline:none}._video-container_yk4kf_1 .video-js .vjs-slider:focus{box-shadow:none!important;text-shadow:none!important;outline:none}._video-container_yk4kf_1 ._video_yk4kf_1{position:relative}._loadingVideo_yk4kf_54{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.9);z-index:10}._playOver_yk4kf_63{background:rgba(0,0,0,.5);color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}._playOver_yk4kf_63 ._tips_yk4kf_71{font-size:.4rem;color:#fff}._playOver_yk4kf_63 ._btn_yk4kf_75{margin:.26667rem 0;min-width:2.50667rem;font-size:.37333rem;height:.74667rem;line-height:.74667rem}._playOver_yk4kf_63 ._replay_yk4kf_82{padding-top:.32rem}._playOver_yk4kf_63 ._showReload_yk4kf_85{display:flex;align-items:center}._playOver_yk4kf_63 ._iconReplay_yk4kf_89{width:.48rem;height:.48rem;margin-right:.16rem}._freeTxt_yk4kf_94{font-size:.4rem;color:#fff;line-height:.56rem;padding-top:.26667rem}._freeRate_yk4kf_100{color:#32ffd8}\n",document.head.appendChild(o),System.register(["./ResizeObserver.es-legacy.9ef5ac8c.js","./plyr-legacy.2bfabaee.js","./tcplayer.v4.8.0.min-legacy.eb8b469e.js","./tcplayer-legacy.cc17772c.js"],(function(e){"use strict";var n,r,o,a,l,s,c,u,f,y,p,d,v;return{setters:[function(e){n=e.d,r=e.b5,o=e.n,a=e.g,l=e.y,s=e.j,c=e.aT,u=e.A,f=e.F,y=e.N,p=e.B,d=e.T},function(){},function(e){v=e.T},function(){}],execute:function(){var A="_video-container_yk4kf_1",h="_video_yk4kf_1",g="_loadingVideo_yk4kf_54",m="_playOver_yk4kf_63",k="_tips_yk4kf_71",b="_btn_yk4kf_75",_="_replay_yk4kf_82",w="_showReload_yk4kf_85",S="_iconReplay_yk4kf_89",R="_freeTxt_yk4kf_94";e("C",n({name:"col-video",props:{trySee:{type:Boolean,default:!1},payType:{type:String,default:""},freeTitleStatus:{type:Boolean,default:!0},freeRate:{type:Number,default:100},setting:{type:Object,default:function(){}},controls:Boolean,height:String,src:{type:String,default:""},poster:{type:String,default:""},styleValue:{type:Object,default:function(){return{}}},preload:{type:String,default:"auto"},currentTime:{type:Boolean,default:!0},playsinline:{type:Boolean,default:!0},onPlay:{type:Function,default:function(){}},isBuy:{type:Boolean,default:!1},onBuyEmit:{type:Function,default:function(){}}},data:function(){return{disableScreenRecordingFlag:"0",videoID:"video"+Date.now()+Math.floor(100*Math.random()),player:null,loading:!0,trySeeOver:!1,showSeeStatus:!0}},watch:{src:function(){console.log("src, change"),this._init()}},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.sysParamConfig();case 2:n=v.getComponent("Button"),v.getComponent("BigPlayButton").prototype.createEl=function(){var e=n.prototype.createEl.call(this);return e.appendChild(v.dom.createEl("div",{className:"vjs-button-icon",innerHTML:'<button><svg width="41px"height="41px"viewBox="0 0 41 41"version="1.1"xmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none"stroke-width="1"fill="none"fill-rule="evenodd"><g transform="translate(-167.000000, -155.000000)"><g transform="translate(0.000000, 85.000000)"><g transform="translate(158.000000, 70.000000)"><g transform="translate(9.000000, 0.000000)"><circle id="椭圆形"stroke="#FFFFFF"fill-opacity="0.1"fill="#D8D8D8"cx="20.5"cy="20.5"r="20"></circle><path d="M14.5483871,27.6859997 L14.5483871,13.4342349 C14.5480523,12.8729571 14.8729597,12.356555 15.3949624,12.0887034 C15.9169651,11.8208518 16.5522696,11.8445472 17.0503046,12.1504437 L28.6530473,19.2778563 C29.1119763,19.5602271 29.3887725,20.0426422 29.3887725,20.5601173 C29.3887725,21.0775924 29.1119763,21.5600075 28.6530473,21.8423783 L17.0503046,28.9697909 C16.5522696,29.2756874 15.9169651,29.2993828 15.3949624,29.0315312 C14.8729597,28.7636796 14.5480523,28.2472775 14.5483871,27.6859997 Z"id="路径"fill="#FFFFFF"fill-rule="nonzero"></path></g></g></g></g></g></svg></button>'})),e},e.player=v(e.videoID,{appID:"",controls:!0}),e._init(),r("setVideoPlayer",(function(t){"pause"===(null==t?void 0:t.content).status&&e.player.pause()}));case 8:case"end":return t.stop()}}),t)})))()},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:{sysParamConfig:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n="STUDENT"===a.platformType?"/api-student":"/api-teacher",t.next=4,l.get(n+"/sysConfig/queryByParamName",{params:{paramName:"disable_screen_recording_flag"}});case 4:r=t.sent,e.disableScreenRecordingFlag=r.data.paramValue||"",t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()},_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(){"1"===e.disableScreenRecordingFlag&&(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 n=document.getElementById("fullscreen-back");n&&n.remove()}})))},domPlayVisibility:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".vjs-big-play-button"),n=document.querySelector(".vjs-control-bar");e?(null==t||t.setAttribute("style","display:none"),null==n||n.setAttribute("style","display:none")):(null==t||t.removeAttribute("style"),setTimeout((function(){null==n||n.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,n;null===(e=this.player)||void 0===e||e.pause(),null===(t=this.player)||void 0===t||t.src(""),null===(n=this.player)||void 0===n||n.dispose()},render:function(){var e=this;return s("div",{class:[A,"colVideo"],style:{height:this.height||"210px"}},[s("video",{ref:"video",class:h,id:this.videoID,playsinline:this.playsinline,poster:this.poster,preload:this.preload,style:t({},this.styleValue)},null),this.loading&&s("div",{class:g,style:{height:this.height||"210px"}},[s(c,{size:36,color:"#2dc7aa",vertical:!0,style:{height:"100%",justifyContent:"center"}},{default:function(){return[u("加载中...")]}})]),this.trySee&&this.computedSeeStatus&&!this.loading&&s("div",{class:[g,m],style:{height:this.height||"210px"}},[this.trySeeOver?s(f,null,["STUDENT"===a.platformType?s("p",{class:k},[this.freeTitleStatus?"免费试看结束,购买完整课程后继续学习":"VIP"===this.payType?"免费试看结束,开通会员后继续学习":"试看结束,领取课程后继续学习"]):s("p",{class:k},[u("试看结束")]),"STUDENT"===a.platformType&&s(p,{class:b,type:"primary",round:!0,size:"small",onClick:this.onBuy},{default:function(){return["STUDENT"===a.platformType?e.freeTitleStatus?"立即购买":"VIP"===e.payType?"开通会员":"免费领取":"返回免费"]}}),s("div",{class:["STUDENT"!==a.platformType&&_,w],onClick:this.onReplay},[s("img",{class:S,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvm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CkIhR3VyRCn2S4D1paHT7hwS5BOBXIt4Cx7zhNwbKDR8HZCGTFjclRTdEncHBmIiFqAHorfaTf4kTiEwzXDiBHNMZkkep8UtwvQbjTsOdb+dA/Bcrc2f5lkFsJTgB9aEA3ty8sp28exO0eYnJK0QrKfZPVRWLlnEkWRM6WtP2kk0zxRh8BOfp4r1Xz/iDtebANzDDxpmWsGsjD8RzoB7bJttQfUSY1/hahGvDYrsDqy29mCLwCen9bYX+7cpgl/0tIzxCUbSCrbZ9/MhTYnhPp/poQ9zQpohlcAD1gPJO/yGmwEUR+QYxMYC8GRclrsGwHOQqRz1I5uR4C8n3Rzwd7H23JSitQWoGYVuAP4oZ0uhj36VkAAAAASUVORK5CYII="},null),u("重播")])]):s(f,null,[s(y,{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+A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