Video_wev8.js
891 Bytes
define("Video_html",function(){return'<div id="NMEC_${id}" class="wev-comp-${compType}"> <video src="${url}" controls="controls" controlsList="nodownload" width="${width}" {@if autoplay == true}autoplay="autoplay" {@/if} {@if loop == true}loop="loop"{@/if}> 您的浏览器不支持 video 标签。 </video></div>'}),define(["mUtil","Component"],function(e,o){return o.init(function(i){o.super(this,i),this.type="Video",this.tpl=this.type+"_html";var t=this.viewModel={autoplay:!0,loop:!0,width:"100%"};this.beforeMount=function(){var o=t.url||"";if(0==o.indexOf("/weaver/weaver.file.FileDownload?fileid=")&&e.isIOS()&&e.runtime.isEmobile()){var i=e.getActionUrl("service.MobileCommon",{action:"getRequestURL"});e.ajax(i,null,function(i){1==i.status&&(t.url=i.ipaddr+o)},{type:"GET",dataType:"json",async:!1})}},this.pauseVideo=function(){this.$el.find("video")[0].pause()}})});