;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i=_this3.playTime&&_this.trySee){players.pause();_this.trySeeOver=true;_this.showSeeStatus=true;_this.domPlayVisibility();// 试看结束后隐藏播放按钮 }});});this.player.on('play',function(){postMessage({api:'getDeviceStatus',content:{type:'video'}},function(res){// 判断是否在录屏中, 如果在录屏则不允许播放 if(res.content.status=='1'){Toast('为了保证数据安全,请不要录屏');_this3.player.pause();}});postMessage({api:'limitScreenRecord',content:{type:1}});_this3.onPlay&&_this3.onPlay();});this.player.on('enterfullscreen',function(){console.log('fullscreen');var i=document.createElement('i');i.id='fullscreen-back';i.className='van-icon van-icon-arrow-left video-back';i.addEventListener('click',function(){_this3.player.fullscreen.exit();});console.log(document.getElementsByClassName('plyr'));document.getElementsByClassName('plyr')[0].appendChild(i);});this.player.on('exitfullscreen',function(){console.log('exitfullscreen');var i=document.getElementById('fullscreen-back');i&&i.remove();});},// 操作功能 domPlayVisibility:function domPlayVisibility(){var hide=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var controls=document.querySelector('.plyr__controls');var controls2=document.querySelector('.plyr__control--overlaid');if(hide){controls===null||controls===void 0?void 0:controls.setAttribute('style','display:none');controls2===null||controls2===void 0?void 0:controls2.setAttribute('style','display:none');}else{controls===null||controls===void 0?void 0:controls.removeAttribute('style');setTimeout(function(){controls2===null||controls2===void 0?void 0:controls2.removeAttribute('style');},200);}},onClickPlay:function onClickPlay(){this.player.play();this.domPlayVisibility(false);this.showSeeStatus=false;},onBuy:function onBuy(){this.$router.back();},onReplay:function onReplay(){this.player.restart();this.player.play();this.domPlayVisibility(false);this.trySeeOver=false;this.showSeeStatus=false;}},unmounted:function unmounted(){var _this$player;(_this$player=this.player)===null||_this$player===void 0?void 0:_this$player.destroy();},render:function render(){var _this4=this;return createVNode("div",{"class":styles['video-container']},[createVNode("video",{"ref":"video","class":styles['video'],"src":this.src,"playsinline":this.playsinline,"poster":this.poster,"preload":this.preload,"style":_objectSpread({},this.styleValue)},null),this.loading&&createVNode("div",{"class":styles.loadingVideo,"style":{height:this.height||'210px'}},[createVNode(Loading,{"size":36,"color":"#2dc7aa","vertical":true,"style":{height:'100%',justifyContent:'center'}},{default:function _default(){return[createTextVNode("\u52A0\u8F7D\u4E2D...")];}})]),this.trySee&&this.computedSeeStatus&&!this.loading&&createVNode("div",{"class":[styles.loadingVideo,styles.playOver],"style":{height:this.height||'210px'}},[!this.trySeeOver?createVNode(Fragment,null,[createVNode(Icon,{"name":iconVideoPlay,"size":50,"onClick":this.onClickPlay},null),createVNode("p",{"class":styles.freeTxt},[createTextVNode("\u514D\u8D39"),this.freeTitleStatus?'试看':'领取'])]):createVNode(Fragment,null,[createVNode("p",{"class":styles.tips},[this.freeTitleStatus?'免费试看结束,购买完整课程后继续学习':'试看结束,领取课程后继续学习']),createVNode(Button,{"class":styles.btn,"type":"primary","round":true,"size":"small","onClick":this.onBuy},{default:function _default(){return[state.platformType==='STUDENT'?_this4.freeTitleStatus?'立即购买':'免费领取':'返回'];}}),createVNode("div",{"class":styles.replay,"onClick":this.onReplay},[createVNode(Icon,{"name":"replay","style":{marginRight:'5px'},"size":16},null),createTextVNode("\u91CD\u64AD")])])])]);}}));}};});})();