define("a/tpl/sponsor_tpl.html.js",[],function(){ return'\n
\n
\n

广告,也可以是生活的一部分

\n
\n
\n <# if(!!has_banner){ #> \n
\n \n <# }else{ #> \n
\n\n <# } #>\n \n
\n
\n \n <# if(!!has_desc){ #>\n
\n

<#=title#>

\n
提供的广告 \n
\n
\n <# } #>\n
\n \n
\n
\n
'; });define("a/tpl/new_cpc_tpl.html.js",[],function(){ return'\n\n
\n \n \n
\n <# if(isVideo){ #> \n
\n
\n
\n \n <# }else{ #> \n
\n <# } #>\n \n
\n
\n <# if(avatar){ #>\n \n \n <# } #>\n \n
\n \n <# if(!!title){ #>\n

<#=title#>

\n <# if(!!price){ #> \n

¥<#=price#>

\n <# } #>\n\n \n \n \n \n <# if(pos_type === 0 && parseInt(crt_size) === 708){ #>\n

\n \n \n

\n <# } #>\n <# } #>\n <# if(!(tag_pos == \'left\' || tag_pos == \'right\') && superscript){ #>\n \n \n
广告
style="display:none"<#}#>>\n \n
\n
\n <# } #>\n
\n
\n\n \n <# if(isDownload) {#>\n \n \n
<#=btn_text#>
\n
\n
<#=btn_text#>
\n
\n
\n \n \n \n \n \n \n\n <# }else{ #>\n \n \n \n <# if(!!is_wx_app){ #>\n <# if(pos_type === 0 && parseInt(crt_size) === 708){ #>\n <# } else { #><# } #>\n \n <# } #>\n <#=btn_text#>\n \n <# } #>\n
\n
\n
\n'; });define("appmsg/emotion/caret.js",[],function(e,t){ "use strict"; var t={}; return t.get=function(e){ var t=0; if(document.selection){ e.focus(); var a=document.selection.createRange(); a.moveStart("character",-e.value.length),t=Sel.text.length; }else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart); return t; },t.set=function(e,t){ if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){ var a=e.createTextRange(); a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(); } },t; });define("pages/audition_tpl.html.js",[],function(){ return'
\n
\n
\n
<#=msg#>
\n \n
\n
'; });define("biz_wap/utils/localstorage.js",[],function(){ "use strict"; var t={}; return t=window.localStorage?{ set:function(t,e){ null!==this.get(t)&&this.remove(t),localStorage.setItem(t,e); }, get:function(t){ var e=localStorage.getItem(t); return void 0===e?null:e; }, remove:function(t){ localStorage.removeItem(t); }, clear:function(){ localStorage.clear(); }, each:function(t){ for(var e,o=localStorage.length,n=0,t=t||function(){};o>n&&(e=localStorage.key(n), t.call(this,e,this.get(e))!==!1);n++)localStorage.lengtht;t++)for(var o=0;h>o;o++){ var n=t*h+o; e[n]&&v.push({ name:e[n].style, title:e[n].emoji?e[n].emoji:e[n].cn, bp:"background-position: 0 -"+n*y+"px;", id:e[n].id }); } for(var t=0;t=_.getInnerHeight()?!0:!1; } function c(){ u.on(f.emotionSwitch,"click",function(){ var e=f.emotionPanel,t=e.style.display; "none"===t?(e.style.display="",e.style.left=f.tool.getBoundingClientRect().left+"px", e.style.top=window.scrollY+f.tool.getBoundingClientRect().top+f.tool.getBoundingClientRect().height+"px", l(e)&&m(e)):e.style.display="none"; }); } function s(){ var e=f.emotionPanel; ""===e.style.display&&(e.style.left=f.tool.getBoundingClientRect().left+"px",e.style.top=window.scrollY+f.tool.getBoundingClientRect().top+f.tool.getBoundingClientRect().height+"px"); } function a(e){ var t=document.createElement("div"),o="",n="",i=[],m=void 0; t.innerHTML=e; for(var l=0;l1&&"icon_emotion_single"===i[0]&&(o=b[i[1]],m=document.createTextNode(o), t.replaceChild(m,c)))); } } var s=t.innerHTML; return s=s.replace(//gi,"\n").replace(/<.*?>/g,""); } function d(){ n(),i(),c(); } var r=e("biz_common/utils/emoji_data.js"),p=e("biz_common/utils/emoji_panel_data.js"),u=e("biz_common/dom/event.js"),g=e("appmsg/emotion/emotion.js").encode,_=e("common/utils.js"),f={ emotionSwitch:document.getElementById("js_emotion_wrp_pc"), emotionPanel:document.getElementById("js_emotion_panel_pc"), emotionList:document.getElementById("js_emotion_list_pc"), input:document.getElementById("js_cmt_input"), submit:document.getElementById("js_cmt_submit"), tool:document.getElementById("js_comment_tool_pc") },h=16,j=7,y=24,v=[],b={}; window.onresize=function(){ s(); },o.exports={ init:d, edata:v, encode:g, textFilter:a, emotionPanelMove:s }; });define("appmsg/friend_comment_tpl.html.js",[],function(){ return'<#if(window.new_appmsg){#>\n \n\n \n <#if(window._copyright_stat!=1 || window.need_pay!=1){#>\n \n <#}#>\n\n<#}else{#>\n \n\n \n\n<#}#>\n'; });define("appmsg/comment_pc_tpl.html.js",[],function(){ return' \n<#if(window._copyright_stat!=1 || window.need_pay!=1){#>\n\n<#}#>'; });define("appmsg/comment_tpl.html.js",[],function(){ return'<#if(window.new_appmsg){#>\n\n \n\n\n \n <#if(window._copyright_stat!=1 || window.need_pay!=1){#>\n \n <#}#>\n\n \n \n\n\n
\n \n 正在加载\n
\n\n \n
\n
\n
\n
删除该留言吗?
\n
\n 取消\n 删除\n
\n
\n
\n<#}else{#>\n \n\n\n \n\n \n \n\n\n
\n \n 加载中\n
\n\n \n\n \n<#}#>\n\n'; });define("biz_wap/utils/fakehash.js",["biz_common/dom/event.js"],function(t){ "use strict"; function s(t){ t=t||location.hash.substr(1); var s,o,e,i,r=!1,c=[]; for(s=0;s\n
\n
\n
是否立即下载该应用
\n
\n
\n
\n \n \n \n
\n
\n <#=app_name#>\n
\n
\n
\n
\n 取消\n 下载\n
\n
\n\n'; });;define('widget/wx_profile_dialog_primary.css', [], function(require, exports, module) { return ".radius_avatar{display:inline-block;background-color:#fff;padding:3px;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;overflow:hidden;vertical-align:middle}.radius_avatar img{display:block;width:100%;height:100%;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;background-color:#eee}.wx_profile_dialog_primary .weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.wx_profile_dialog_primary .weui-dialog{position:fixed;z-index:5000;width:80%;max-width:300px;top:50%;left:50%;-webkit-transform:translate(-50%,-65%);transform:translate(-50%,-65%);background-color:#fff;text-align:center;border-radius:3px;overflow:hidden}.wx_profile_dialog_primary .weui-dialog__hd{position:relative;padding:20px 20px 10px;text-align:left}.wx_profile_dialog_primary .weui-dialog__hd:after{content:\" \";position:absolute;left:20px;right:20px;bottom:0;height:1px;border-bottom:1px solid #d5d5d6;color:#d5d5d6;-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:scaleY(0.5);transform:scaleY(0.5)}.wx_profile_dialog_primary .weui-dialog__title{font-weight:400;font-size:17px}.wx_profile_dialog_primary .weui-dialog__bd{padding:16px 20px;min-height:40px;font-size:15px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.wx_profile_dialog_primary .weui-dialog__bd:first-child{padding:2.7em 20px 1.7em;color:#353535}.wx_profile_dialog_primary .weui-dialog__ft{position:relative;line-height:44px;font-size:17px;display:-webkit-box;display:-webkit-flex;display:flex}.wx_profile_dialog_primary .weui-dialog__ft:after{content:\" \";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #d5d5d6;color:#d5d5d6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(0.5);transform:scaleY(0.5)}.wx_profile_dialog_primary .weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.wx_profile_dialog_primary .weui-dialog__btn:active{background-color:#eee}.wx_profile_dialog_primary .weui-dialog__btn:after{content:\" \";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #d5d5d6;color:#d5d5d6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(0.5);transform:scaleX(0.5)}.wx_profile_dialog_primary .weui-dialog__btn:first-child:after{display:none}.wx_profile_dialog_primary .weui-dialog__btn_default{color:#353535}.wx_profile_dialog_primary .weui-dialog__btn_primary{color:#1aad19}.wx_profile_dialog_primary .weui-skin_android .weui-dialog{text-align:left;box-shadow:0 6px 30px 0 rgba(0,0,0,0.1)}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__title{font-size:21px}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__hd{text-align:left;padding:1.3em 1.6em 1.2em}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__hd:after{display:none}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__bd{color:#999;padding:0 1.6em 1.4em;font-size:17px;text-align:left}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__bd:first-child{padding:1.6em 1.6em 2em;color:#353535}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__ft{display:block;text-align:right;line-height:42px;font-size:16px;padding:0 1.6em .7em}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__ft:after{display:none}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn{display:inline-block;vertical-align:top;padding:0 .8em}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn:after{display:none}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn:active{background-color:rgba(0,0,0,0.06)}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn:visited{background-color:rgba(0,0,0,0.06)}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn:last-child{margin-right:-0.8em}.wx_profile_dialog_primary .weui-skin_android .weui-dialog__btn_default{color:#808080}@media screen and (min-width:1024px){.wx_profile_dialog_primary .weui-dialog{width:35%}}.wx_profile_dialog_primary .weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.wx_profile_dialog_primary .weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}.wx_profile_dialog_primary .weui-flex{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.wx_profile_dialog_primary .weui-flex__item{word-wrap:break-word;word-break:break-all}.wx_profile_info_avatar_wrp{padding-right:10px}.wx_profile_info_avatar{width:50px;height:50px;padding:0;display:inline-block;background-color:#fff;vertical-align:middle}.wx_profile_info_avatar img{display:block;width:100%;-webkit-border-radius:10px;border-radius:10px}.wx_profile_info_title{display:block;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:16px;font-weight:400;text-align:left}"; });define("new_video/player.js",["page/pages/video.css","biz_wap/zepto/zepto.js","biz_wap/zepto/event.js","biz_wap/zepto/touch.js","biz_wap/jsapi/log.js","biz_common/dom/event.js","new_video/player.html.js","biz_wap/utils/device.js","new_video/ctl.js","biz_common/tmpl.js","pages/iframe_communicate.js","a/a_utils.js","biz_common/utils/url/parse.js","pages/version4video.js","biz_wap/utils/wapsdk.js","biz_common/base64.js","biz_wap/jsapi/core.js","new_video/plugin/util.js"],function(e){ "use strict"; function t(){ i(); } function i(){ document.webkitVisibilityState?document.addEventListener("webkitvisibilitychange",s,!1):document.msVisibilityState?document.addEventListener("msvisibilitychange",s,!1):document.visibilityState&&document.addEventListener("visibilitychange",s,!1); } function o(){ if("hidden"in document)return"hidden"; for(var e=["webkit","moz","ms","o"],t=0;t0?!0:!1; }catch(S){ P._debug=!1; } var j=3e3; t(); var C=function(e){ P._debug&&console.log(e); },B=navigator.userAgent,k=function(){ return!0; }(),F=-1!==B.indexOf("Safari")&&-1!==B.indexOf("Version")&&-1==B.indexOf("Android"),D=function(){ return!!_.browser.M1; }(),x=function(e,t){ var i=document.createElement("div"); return e in i.style?(i.style[e]=t,i.style[e]===t):!1; },M=function(e){ var t=0,i=0,o=0; .5>e&&(e=0),e=Math.ceil(e); var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),o=e-3600*t-60*i; return 0!=t?(10>t&&(t="0"+t),t+=":"):t="",10>i&&(i="0"+i),10>o&&(o="0"+o),t+i+":"+o; },H=!_.canSupportVideo,E=function(e){ var t=$(e.container); "undefined"==typeof e.videoReportType&&(e.videoReportType=-1),e.width=e.width||300, e.height=e.height||300,e.videoWidth=e.videoWidth||0,e.videoHeight=e.videoHeight||0, e.duration=e.duration||0,e.videoFit=!1; var i={ needToFit:!1, supportObjectFit:!1, os:_.os }; if(e.width&&e.height&&e.videoWidth&&e.videoHeight){ var o=Math.abs(e.width/e.height-e.videoWidth/e.videoHeight); .1>=o&&(i.needToFit=!0,x("objectFit","fill")&&(i.supportObjectFit=!0,e.videoFit=!0)); } e.ratio=e.ratio||e.width/e.height,e.autoplay=!!e.autoplay||!1,e.networkControl=!!e.networkControl||!1, e.flow=e.flow||0,this.opt=e,this.id=e.id=+new Date+"_"+Math.floor(Math.random()*Math.floor(+new Date)), this.__iosPreloadPause=!1,this.__iosPreloadPlayFlag=!1,this.__iosIsRealPreload=!1, this.__forcePause=!1,this.__hasFuncControllBar=!0,this.__dragTimes=[],this.__play_total_time=0, this.__last_playtime=0,this.__always_hide_loading=e.always_hide_loading||!1,this.__last_loadingtime=0, this.__loadingCountFlag=null,this.__userplaytime=!1,this._playingBufferingStartTime=null, this._g={ timeupdateCacheCount:5, serialTimeupdateCache:[], resetShowingLoadingTimeoutId:null, showingLoadingTimeoutId:null, statusDefine:{ init:1, play:1, pause:1, loading:1, end:1, error:1 }, subStatusDefine:{ init:1, play:1, playing:1, waiting:1, stalled:1, seeking:1, seeked:1, preload:1 }, status:"init", subStatus:"init", triggerTimeupdateLog:!0, showFlowNotice:!1, lastNetworkType:null, isUserPause:!1, hasReportBeginPlay:!1 },e._mustHideFullScreen=D,e.display=e.autoHide?"none":"block",e.ad_muted_btn=e.ad_muted_btn||!1; var n=c.tmpl(u,e); t.append(n); var a=this.container=$("#js_mpvedio_"+this.id); this.$video=a.find("video"); var s=this.video=this.$video[0]; this.__initData(),this.__initVideo(); var r=e.src; if(!r)return this.changeStatus({ status:"error", subStatus:"5" }),void this.__triggerOutside("error",{ errorcode:5 }); if(s.setAttribute("origin_src",r),H)return a.find(".js_btn_play").attr("href",r).show(), this.__loadedHandler(),void this.__bindBtnEvent(); var l=e.plugins||[]; this._blockPlugin={}; for(var d=0,h=l.length;h>d;++d){ var p=l[d]; p.setPlayer(this),!!p.init&&p.init(); } this.plugins=l,this._trigger("afterCheckVideoFit",i),this._trigger("loading",e), this._defineEvent(),this.__bindBtnEvent(),this.__bindVideoEvent(),this.__bindNetworkChangeEvent(), this._addPostmessageListener(),P._players[this.id]=this; }; return $.extend(E.prototype,{ _jsapiLog:function(e){ var t=["vid:","videosrc:"]; this.opt&&this.opt.extinfo&&this.opt.extinfo.vid&&(t[0]+=this.opt.extinfo.vid),this.$video&&this.$video[0]&&this.$video[0].src&&(t[1]+=this.$video[0].src), l.info("videoplayer "+t.join(";")+";"+e); }, __triggerOutside:function(){ var e=this.opt,t=arguments,i=t[0],o=this,n=this.video; if(i){ i=i.substr(0,1).toUpperCase()+i.substr(1); var a=e["on"+i]; "function"==typeof a&&a.apply(this,t),"BeginPlay"!=i||null!=o.__replaySec&&0!=o.__replaySec||!_.os.ios||(n.currentTime=.1); } }, __errorHandler:function(){ this.video.removeAttribute("src"); }, __loadingHandler:function(e){ this.showLoading(),this._trigger("ready",e); }, __readyHandler:function(e){ var t=this.opt.src; v.proxyPreloadExper()&&v.proxyPreloadExper().isUsePreload&&this.setSrc(t),this._trigger("loaded",e); }, __loadedHandler:function(e){ if(e&&e.autoplay&&!F)return this.videoCtlReport({ step:15 }),this._g.hasReportBeginPlay=!0,void this._trigger("readyBeginPlay",e); if(this.opt.networkControl&&!T.isVideoNeedFlowNotice(this.opt.flow)&&T.isNetworkUnWifi(window.networkType))return this.videoCtlReport({ step:15 }),this._g.hasReportBeginPlay=!0,void this._trigger("readyBeginPlay",e); this.hideLoading(); var t=!T.isUserClickPlay()&&this.opt.flow>10||T.isUserClickPlay()&&T.isVideoNeedFlowNotice(this.opt.flow); if(this.opt.networkControl&&T.isNetworkUnWifi(window.networkType)&&window.simType&&1!==window.simType&&t){ this.container.find(".js_video_flow").show(); var i=this.opt.flow; i&&(this.container.find(".js_video_flow_num").html(i+"M"),this.container.find(".js_flow_notice").show(), this.container.find(".js_flow_play_btn").show()),this._g.showFlowNotice=!0; }else{ this.container.find(".js_video_play_controll").css({ display:"block" }); var o=this.opt.duration; o&&o>0&&this.container.find(".js_video_length").html(M(o)).show(),this._g.showFlowNotice=!1; } if(1==this.__iosPreloadPause){ var n=this; setTimeout(function(){ var e=n.container.find(".js_video_pause_controll"); e.hide(); var t=n.container.find(n._g.showFlowNotice?".js_video_flow":".js_video_play_controll"); t.show(); }); } }, __readyBeginPlayHandler:function(e){ v.proxyPreloadExper()&&v.proxyPreloadExper().isUsePreload||this.setSrc(this.opt.src), this._trigger("beginPlay",e); }, __beginPlayHandler:function(){ H&&(location.href=this.opt.src); var e=this.container,t=this,i=this.video; t.__firstPlayStart=+new Date,this.__userplaytime=!0,e.find(".js_video_poster").show(), this.showCover(),e.find(".js_video_play_controll").hide(),e.find(".js_video_flow").hide(), this.__hasBeginPlay=!0,t.showLoading("firstTime"),setTimeout(function(){ t.__continueSec&&(t.__replaySec=t.__continueSec,t.__continueSec=null),console.log("set continue",t.__replaySec), i.play(); },1); }, __replayHandler:function(){ this.videoCtlReport({ step:9 }); var e=this.video.muted; this.setSrc(this.src,this.video.preload,!0),this.triggerMuted(e),this._afterReplay(); }, __endHandler:function(){ this.container.find(".js_btn_play_aria").data("status","3").removeClass("video_playing"), this.hideControllBar(),this._hidePlayControllBar(); }, __hideControllTimeoutCallback:function(){ return this.__onTouch?void this.__hideControllTimeout():void(this.isPlay()&&this.hideControllBar()); }, __touchVideoHandler:function(){ var e=this,t=this.opt; if(t.blockTouchVideo||this.__onTouch)return!1; if(!e.__canplay||e.isEnd()&&t.hideControllBarAtEnd)return void e.hideControllBar(); var i=e.container.find(".js_controll"); "none"==i.css("display")?e.showControllBar():e.hideControllBar(!0),e.__hideControllTimeout(); }, __hideControllTimeout:function(){ var e=this; this.__touchVideoTimeoutHandler&&clearTimeout(this.__touchVideoTimeoutHandler),this.__touchVideoTimeoutHandler=setTimeout(function(){ e.__hideControllTimeoutCallback(); },j); }, __initData:function(){ this.log={ hasended:0, lastsec:0, duration:0, video_error:0 },this.__hasBeginPlay=!1,this.__canplay=!1,this._playingBufferingStartTime=null, this.__userplaytime=!1,this.__hasscroll=!1,this.__replaySec=null,this.__playQueue=[]; }, __initVideo:function(){ var e=this.opt,t=this.video; t.addEventListener("contextmenu",function(e){ e.preventDefault(),e.stopPropagation(); },!1),t.hasAttribute("controls")&&t.removeAttribute("controls"),t.setAttribute("webkit-playsinline","isiPhoneShowPlaysinline"), t.setAttribute("playsinline","isiPhoneShowPlaysinline"),e.loop&&t.setAttribute("loop",e.loop), e.muted&&a(t,!0),this.$video.off("loadedmetadata durationchange"),this.__hasVideoDurationchange=!1; }, __getDuration:function(){ var e=this.opt,t=this.video,i=t.duration; return i&&1!=i?i:e.duration; }, __videoDurationchange:function(){ var e=this; if(!e.__hasVideoDurationchange){ var t=this.video,i=this.opt,o=this.container; if(1/0!=t.duration&&t.duration>0&&1!=t.duration)e.duration=t.duration,e.__hasVideoDurationchange=!0;else{ if(!i.duration)return!1; e.duration=i.duration,e.__hasVideoDurationchange=!0; } e.log.duration=e.duration,e.duration=e.duration>>0,o.find(".js_total_time").text(M(e.duration)), this.__hasFuncControllBar&&o.find(".js_progress_bar,.js_total_time").show(); var n=+new Date,a=n-e.log.loadwait_start; e.log.loadwait=a,e._trigger("durationchange",{ loadwait:a }); } }, __startCountTime:function(){ var e=this,t=this.video; t&&null===e.__last_playtime&&(e.__last_playtime=t.currentTime); }, __endCountTime:function(){ var e=this,t=this.video; t&&t.currentTime>e.__last_playtime&&null!==e.__last_playtime&&(e.__play_total_time+=t.currentTime-e.__last_playtime, e.__last_playtime=null); }, __bindVideoEvent:function(){ var e=this.$video,t=this,i=this.container,o=i.find(".js_switch"),n=(i.find(".js_video_pause_controll"), this.video); e.off("timeupdate").on("timeupdate",function(){ if(t.__forcePause===!0)return void C(t.id+":timeupdate __forcePause return"); if(t.__hasBeginPlay&&!t.__canplay)return t.showLoading(),!1; n=t.video,null!=t.__replaySec&&(C(t.id+":timeupdate __replaySec"),n.pause(),n.currentTime=t.__replaySec, t.__last_playtime=t.__replaySec,n.play(),t.__replaySec=null),t.__videoDurationchange(); var e=n.currentTime; if(e>0){ t.__startCountTime(),t._addSerialTimeupdate(),("loading"!==t._g.status||"waiting"!==t._g.subStatus&&"seeking"!==t._g.subStatus)&&t._checkPlayBySerialTimeupdate()&&t.hideLoading(); var i=t.__getDuration(); t.__onTouch||(t.__setControllBar(e/i),t.__setPlayTime(e)),t.hideCover(),t._trigger("timeupdate",{ currentTime:e }),r(t); } }),e.off("canplay").on("canplay",function(){ null!=t.__replaySec&&(n.currentTime=1*(1*t.__replaySec).toFixed(4),t.__last_playtime=t.__replaySec, t.__replaySec=null),t.__canplay=!0,t._trigger("canplay"); }),e.off("ended").on("ended",function(){ C("player inner isend:"+t.isEnd()),t.isEnd()&&(t.changeStatus({ status:"end", subStatus:"" }),t.__endCountTime(),t._trigger("end")); }),e.off("emptied").on("emptied",function(){}),t.waitingHandlerTimer=null; var a=0; e.off("stalled").on("stalled",function(){ if(this.__hasBeginPlay&&!t.waitingHandlerTimer){ t.changeStatus({ status:"loading", subStatus:"stalled" }),t.showLoading(); var e=n.src,i=n.readyState,o=n.error; 0!=i||o&&0!=o.code||(clearTimeout(t.waitingHandlerTimer),t.waitingHandlerTimer=null, t.showLoading(),t.showCover(),n.pause(),n.src=e,n.load(),n.play(),C(t.id+":stalled")); } }),e.on("seeked",function(){ t.__onTouch||(t.changeStatus({ status:"loading", subStatus:"seeked" }),n.play()),C("video seeked event"); }),e.off("seeking").on("seeking",function(){ C("seeking,__hasBeginPlay:"+t.__hasBeginPlay),t.__hasBeginPlay&&(t.changeStatus({ status:"loading", subStatus:"seeking" }),t.showLoading()); }),e.off("waiting").on("waiting",function(){ if(C("waiting,__hasBeginPlay:"+t.__hasBeginPlay),t.__hasBeginPlay){ t.changeStatus({ status:"loading", subStatus:"waiting" }),t.showLoading(),console.log("waiting counting begin"),t.loadingCountFlag||clearTimeout(t.loadingCountFlag), t.__last_loadingtime=n.currentTime,t.loadingCountFlag=setTimeout(function(){ n.currentTime===t.__last_loadingtime&&(t.changeStatus({ status:"error", subStatus:"6" }),t.__triggerOutside("error",{ errorcode:6 })); },b),clearTimeout(t.waitingHandlerTimer),t.waitingHandlerTimer=null; var e=0; for(var i in P._players)if(P._players.hasOwnProperty(i)&&e++,e>1)break; e>1&&t.__forcePause===!1&&(t.waitingHandlerTimer=setTimeout(function(){ if(t.__forcePause!==!0){ var e=n.error; if(0==n.readyState&&(!e||0==e.code)){ clearTimeout(t.waitingHandlerTimer),t.waitingHandlerTimer=null; var i=n.src; t.showLoading(),t.showCover(),n.pause(),n.src=i,a++,n.load(),n.play(),C(t.id+":waitingHandlerTimer"); } } },1e4)),t._trigger("waiting"); } }),e.off("play playing").on("play playing",function(e){ return t.__forcePause===!0?void C(t.id+":play playing __forcePause return"):(t.changeStatus({ status:"play", subStatus:e.type }),setTimeout(function(){ t.adVideoStatus="play"; },10),C(t.id+":play playing"),o.removeClass("switch_on"),o.addClass("switch_off"), t._hidePlayControllBar(),t.__startCountTime(),void t._trigger("play")); }),e.off("pause").on("pause",function(){ C(t.id+":video pause event"),t.changeStatus({ status:"pause", subStatus:"" }),setTimeout(function(){ t.adVideoStatus="pause"; },10),o.addClass("switch_on"),o.removeClass("switch_off"),!t.__canplay||t.isEnd()||t.__onTouch?t._hidePlayControllBar():(t.hideControllBar(!0), t._showPlayControllBar()),t.__endCountTime(),t._trigger("pause"); }),e.off("error").on("error",function(){ var e; t.video.error&&(e=t.video.error.code),t.changeStatus({ status:"error", subStatus:e||"" }),t._trigger("error",{ errorcode:e }); }),e.off("webkitbeginfullscreen webkitendfullscreen webkitfullscreenchange mozfullscreenchange fullscreenchange").on("webkitbeginfullscreen webkitendfullscreen webkitfullscreenchange mozfullscreenchange fullscreenchange",function(e){ var i; i="webkitbeginfullscreen"==e.type?!0:"webkitendfullscreen"==e.type?!1:document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen; var o=$(this); i?(o.parents(".js_inner").removeClass("not_fullscreen"),t.__isInFullScreen=!0):(o.parents(".js_inner").addClass("not_fullscreen"), t.hideLoading(),t.__isInFullScreen=!1),C("fullscreenchange state:"+t.__isInFullScreen+"; event type:"+e.type), t._trigger("fullscreenchang",{ state:i }),p.broadcastMessage({ type:"fullscreenchange", data:{ fullScreen:t.__isInFullScreen, id:t.id } }); }); }, _defineEvent:function(){ var e=this; this._event={ progressBarMousemove:function(t){ e.__hasFuncControllBar&&e.__onTouch&&e._pointerMoveHandler({ x:t.pageX||t.clientX, y:t.pageY||t.clientY, e:t }); }, progressBarMouseup:function(t){ return e.__hasFuncControllBar&&e.__onTouch?(e._pointerUpHandler({ x:t.pageX||t.clientX, y:t.pageY||t.clientY, e:t }),!1):void 0; }, progressBarTouchmove:function(t){ if(e.__hasFuncControllBar&&e.__onTouch){ var i=t.changedTouches[0]; e._pointerMoveHandler({ x:i.pageX, y:i.pageY, e:t }); } }, progressBarTouchend:function(t){ if(e.__hasFuncControllBar&&e.__onTouch){ var i=t.changedTouches[0]; return e._pointerUpHandler({ x:i.pageX, y:i.pageY, e:t }),!1; } }, broadcastPlay:function(t){ t.id!==e.id&&e.__hasBeginPlay&&!e.isEnd()&&e.pause4outer(); } }; }, _addPostmessageListener:function(){ p.addListener({ type:"broadcastPlay", func:this._event.broadcastPlay }); }, __bindBtnEvent:function(){ function e(){ if(H)return location.href=i.opt.src,!1; i.changeStatus({ status:"loading", subStatus:"preload" }); var e=2; i._g.hasReportBeginPlay?e=9:window.cgiData&&"0"==window.cgiData.media_source&&(e=11), i.videoCtlReport({ step:e }),i._g.hasReportBeginPlay=!0,i._trigger("readyBeginPlay"); } function t(){ i.isPlay()?(i.videoCtlReport({ step:12 }),i.pause4outer()):i.play4outer(); } var i=this,o=this.opt,n=(o.extinfo,this.container),a=(this.video,n.find(".js_video_play_controll"), n.find(".js_btn_play")),s=n.find(".js_btn_play_aria"),r=n.find(".js_video_poster"),l=n.find(".js_switch"),u=n.find(".js_progress_bar"),h=n.find(".js_controll"),c=(n.find(".js_played_bar"), n.find(".js_page_video")),p=n.find(".js_full_mask"),g=n.find(".js_video_pause_controll"),f=n.find(".js_full_screen_control"),v=n.find(".js_loading"),m=n.find(".js_video_flow"),y=n.find(".js_flow_play_btn"); d.on(g[0],"tap",".js_btn_pause",function(){ i.play4outer(); }),d.on(m[0],"tap",".js_flow_pause_btn",function(){ i.play4outer(),T.setUserClickPlay(o.flow),i._g.showFlowNotice=!1; }); var w,b,P,S,j=0,C=!1,B=0,F=0,D=i.__getDuration(),x=0,M=0,E=1,L=window.user_uin||0,I=0!==L&&Math.floor(L/100)%1e3=10)return void(C=!1); var s=t-w,r=n-b.x,l=a-b.y,d=Math.sqrt(Math.pow(r,2)+Math.pow(l,2))+F,u=Math.min(Math.ceil(d/s),6); B=Math.floor(.1*d+.2*u*u*u)*Math.ceil(D/500),F=0==B?d:0,0>r&&(B=-B); var _=180*Math.atan2(l,r)/Math.PI; C||(_>=-30&&30>=_&&++j,(_>=150&&180>=_||_>=-180&&-150>=_)&&--j,(j>=4||-4>=j)&&(5>=d?j=0:(z=Math.max(z,u), C=!0))),C&&(x+=B,0>x&&(x=0),x>D&&(x=1*D),i.__setForwardBar(x),e.preventDefault(), e.stopPropagation()),b={ x:n, y:a },w=t; } }),c.on("touchend",function(e){ if(C){ if(i.play(x),n.find(".js_forward").css("display","none"),I&&((new Image).src="/mp/jsmonitor?idkey=28307_29_1", !V)){ var t=(new Date,{ x:e.changedTouches[0].clientX, y:e.changedTouches[0].clientY }),o=t.x-S.x,a=t.y-S.y,s=parseInt(Math.sqrt(Math.pow(o,2)+Math.pow(a,2))),r=parseInt(180*Math.atan2(a,o)/Math.PI); r>=-30&&30>=r||r>=150&&180>=r||r>=-180&&-150>=r||((new Image).src="/mp/jsmonitor?idkey=28307_35_1"), (new Image).src="/mp/jsmonitor?idkey=28307_31_1;28307_33_"+s+";28307_34_"+z,V=!0; } i._seekReport(),i._trigger("handDragComplete",{ playTime:x, startDragVideoTime:M }); } B=0,C=!1,j=0; }),c.on("touchmove MSPointerMove pointermove mousemove",function(e){ i.isInFullScreen()&&!k&&(e.preventDefault(),e.stopPropagation()); }),d.tap(c[0],function(e){ e.target===h[0]||h[0].contains(e.target)||i.isEnd()||i.isPause()||C||i._trigger("touchVideo"); }),d.tap(p[0],function(){ i.isEnd()||i._trigger("touchVideo"); }),p.on("touchmove MSPointerMove pointermove mousemove",function(e){ i.isInFullScreen()&&!k&&(e.preventDefault(),e.stopPropagation()); }),d.tap(s[0],function(){ var o=$(this),n=1*o.data("status"); 0==n?(o.addClass("video_playing").data("status","1"),e()):1==n?(o.removeClass("video_playing").data("status","2"), t()):2==n?(o.addClass("video_playing").data("status","1"),t()):3==n&&(o.addClass("video_playing").data("status","1"), i._trigger("ariaReplay")); }),d.tap(a[0],function(){ e(); }),d.tap(y[0],function(){ e(),T.setUserClickPlay(o.flow),i._g.showFlowNotice=!1; }),d.tap(v[0],function(){ i._trigger("touchVideo"); }),d.tap(l[0],function(){ t(); }),i.__onTouch=!1,u.on("mousedown",function(e){ i.__hasFuncControllBar&&(h.off("mousemove",i._event.progressBarMousemove).on("mousemove",i._event.progressBarMousemove), r.off("mousemove",i._event.progressBarMousemove).on("mousemove",i._event.progressBarMousemove), $(document.body).off("mouseup").on("mouseup",i._event.progressBarMouseup),i._pointerDownHandler({ x:e.pageX||e.clientX, y:e.pageY||e.clientY, e:e })); }),u.on("touchstart",function(e){ if(i.__hasFuncControllBar){ u.off("touchmove",i._event.progressBarTouchmove).on("touchmove",i._event.progressBarTouchmove), u.off("touchend",i._event.progressBarTouchend).on("touchend",i._event.progressBarTouchend); var t=e.changedTouches[0]; i._pointerDownHandler({ e:e, x:t.pageX, y:t.pageY }); } }),d.tap(f[0],function(e){ return i.isInFullScreen()?k&&i.exitFullScreen():k&&((new Image).src=location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?idkey=28307_56_1&r="+Math.random(), i.enterFullScreen()),e.stopPropagation(),e.preventDefault(),!1; }); }, __bindNetworkChangeEvent:function(){ var e=this; w.on("onNetWorkChange",function(t){ if(console.log("networkchanged",t),t.networkType||(t.networkType=t.netType),t.networkType&&t.simType&&e.opt.networkControl){ if(null!==e._g.lastNetworkType&&T.isObjectValueEqual(e._g.lastNetworkType,t)){ if(T.isObjectValueEqual(e._g.lastNetworkType,t))return; }else e._g.lastNetworkType=t; window.simType=t.simType,window.networkType=t.networkType; var i=!T.isUserClickPlay()&&e.opt.flow>10||T.isUserClickPlay()&&T.isVideoNeedFlowNotice(e.opt.flow); if("wifi"===t.networkType&&!T.isNoneNetwork(e._g.lastNetworkType)||T.isNoneNetwork(t.networkType)&&"wifi"!=e._g.lastNetworkType)if(e._g.showFlowNotice=!1, e.hasBeginPlay())e.isPause()&&!e.isEnd()&&e._g.isUserPause&&"none"!==e.container.find(".js_video_flow").css("display")?(e.pause4outer(), e._g.isUserPause=!1):!e.isPause()||e.isEnd()||e._g.isUserPause||"none"===e.container.find(".js_video_flow").css("display")||e.play4outer();else{ if(e.__userplaytime=!0,H)return location.href=e.opt.src,!1; e.changeStatus({ status:"loading", subStatus:"preload" }); var o=2; e._g.hasReportBeginPlay?o=9:window.cgiData&&"0"==window.cgiData.media_source&&(o=11), e.videoCtlReport({ step:o }),e._g.hasReportBeginPlay=!0,e._trigger("readyBeginPlay"); }else T.isNetworkUnWifi(t.networkType)&&1!==window.simType&&i?(e._g.showFlowNotice=!0, e.opt.flowNotice&&(e.isPlay()||e.isEnd()||(console.log("player is play",e.isPlay()), e._g.isUserPause=!0),e.hasBeginPlay()&&e.pause4outer())):e._g.showFlowNotice=!1; } }); }, _pointerDownHandler:function(e){ this.__onTouch=!0,this.showControllBar(),this.progressBarSeekData={ x1:e.x, y1:e.y, startTime:this.video.currentTime },this.pause(),e.e.preventDefault(); }, _pointerMoveHandler:function(e){ var t=this.container.find(".js_played_bar"),i=this.container.find(".js_progress_bar"); this.__onTouch=!0,this.__has_drag=!0,this.progressBarSeekData.x2=e.x,this.progressBarSeekData.y2=e.y; var o=t.offset(),n=i.width(),a=(e.x-o.left)/n,s=this.__getDuration(),r=1*(s*a).toFixed(4); r>s&&(r=s-1); var l=!1; "undefined"==typeof this.progressBarSeekData.dragTime&&(l=!0); var d=Math.abs(1*r-1*this.progressBarSeekData.dragTime); (l||d>=.5)&&(this.progressBarSeekData.dragTime=r,C("_pointerMoveHandler set currentTime, dragTime:"+this.progressBarSeekData.dragTime+" currentTime:"+this.video.currentTime), this.video.currentTime=this.progressBarSeekData.dragTime,this.__setPlayTime(this.progressBarSeekData.dragTime)), this.__setControllBar(a),e.e&&(e.e.preventDefault(),e.e.stopPropagation()); }, _pointerUpHandler:function(e){ var t=this; e.e.preventDefault(),e.e.stopPropagation(),this.container.find(".js_controll").off("mousemove",t._event.progressBarMousemove), this.container.find(".js_video_poster").off("mousemove",t._event.progressBarMousemove), $(document.body).off("mouseup",t._event.progressBarMouseup),this.container.find(".js_progress_bar").off("touchmove",t._event.progressBarTouchmove).off("touchend",t._event.progressBarTouchend), "undefined"==typeof this.progressBarSeekData.dragTime&&this._pointerMoveHandler({ x:e.x, y:e.y }); var i=this.progressBarSeekData.dragTime,o=this.progressBarSeekData.startTime; i==this.video.currentTime&&(i-=.1),this.progressBarSeekData.startTime&&t.__dragTimes.push(Math.round(1e3*this.progressBarSeekData.startTime)+":#:"+Math.round(1e3*i)), this.progressBarSeekData=null,C("_pointerUpHandler dragTime:"+i+" currentTime:"+this.video.currentTime), setTimeout(function(){ t.__onTouch=!1,t.__forcePause=!1,t.isEnd()||(t.showLoading(),t.play(i),t._seekReport(), t._trigger("barDragComplete",{ playTime:i, startDragVideoTime:o })); },0),this.__hideControllTimeout(); }, _seekReport:function(){ this.videoCtlReport({ step:13 }); }, _hidePlayControllBar:function(){ this.container.find(".js_video_pause_controll")&&this.container.find(".js_video_pause_controll").hide(), this.container.find(".js_video_flow")&&this.container.find(".js_video_flow").hide(); }, _showPlayControllBar:function(){ var e=this.container.find(".js_video_pause_controll"); if(!this.isEnd())if(this.hideControllBar(),this._g.showFlowNotice){ var t=this.container.find(".js_video_flow"); e.hide(),this.container.find(".js_video_play_controll").hide(); var i=this.opt.flow; i&&(this.container.find(".js_video_flow_num").html(i+"M"),this.container.find(".js_flow_notice").show(), this.container.find(".js_flow_play_btn").hide(),this.container.find(".js_flow_pause_btn").show(), t.show()); }else e.show(),this.container.find(".js_video_play_controll").hide(),this.container.find(".js_video_flow").hide(); }, _addSerialTimeupdate:function(){ var e=this.video.currentTime,t=this._g.serialTimeupdateCache.length; e>0&&(0==t||this._g.serialTimeupdateCache[t-1].currentTime!=e)&&(this._g.serialTimeupdateCache.length>=this._g.timeupdateCacheCount&&this._g.serialTimeupdateCache.shift(), this._g.serialTimeupdateCache.push({ currentTime:e, timeStamp:+new Date })); }, _checkPlayBySerialTimeupdate:function(){ if(this._g.serialTimeupdateCache.lengthe&&(e=0),e>100&&(e=100); this.video,this.duration; this.__setBufferBar(e),e+="%"; var t=this.container; t.find(".js_played_bar").css({ width:e }),t.find(".js_played_speed_cnt").css({ left:e }); }, __setForwardBar:function(e){ var t=this.container,i=(this.video,this.__getDuration()),o=e/i; t.find(".js_forward").css("display","block"),t.find(".total_time").text(M(i)),t.find(".js_forward_bar").css("width",100*o+"%"), t.find(".js_forward_play_time").text(M(e)); }, __setBufferBar:function(e){ var t=this.container,i=this.video,o=this.__getDuration(),n=i.currentTime; e=e||n/o; var a=e; i.buffered&&i.buffered.length>0&&i.buffered.end&&o&&(a=i.buffered.end(0)/o,a=Math.max(e,Math.ceil(parseInt(100*a))), a>98&&(a=100)),t.find(".js_buffer_bar").css({ width:a+"%" }); }, __resetVideo:function(){ this.$video.remove(); var e=this.container,t=e.find(".js_video_poster"); t.append(""); { var i=this.$video=t.find("video"); this.video=i[0]; } this.__canplay=!1,this.__forcePause=!1,this.__initVideo(),this.__iosPreloadPause=!1, this.__iosPreloadPlayFlag=!1,this.__bindVideoEvent(); }, _trigger:function(e,t){ var i=this,o=this; if("timeupdate"!==e||"timeupdate"===e&&this._g.triggerTimeupdateLog){ "timeupdate"===e&&(this._g.triggerTimeupdateLog=!1,setTimeout(function(){ i._g.triggerTimeupdateLog=!0; },5e3)); try{ var n="",s=Object.prototype.toString.call(t); n="[object String]"===s?t:"[object Object]"===s||"[object Array]"===s?JSON.stringify(t):"no params", this._jsapiLog("trigger:"+e+";arg:"+n+";"); }catch(r){} } if("readyBeginPlay"==e&&(o.__iosPreloadPlayFlag=!1),"play"==e&&0==o.__iosPreloadPlayFlag){ if(console.log("trigger real play"),o.__iosIsRealPreload&&a(o.video,!1),o.__forcePause=!1, o.opt.notPauseOtherVideoWhenPlay||p.broadcastMessage({ type:"broadcastPlay", data:{ id:this.id } }),window.parent.originalVideoAdFrames&&0!=window.parent.originalVideoAdFrames.length)for(var l=0;ll&&(_|=d[l].recv(e,t),!(2&_));++l); if(!(this._blockInnerHandler||4&_)){ var c=this["__"+e+"Handler"]; c&&c.call(this,t); } 8&_||this.__triggerOutside(e,t); }, _setBlockInnerHandler:function(e){ this._blockInnerHandler=e; }, _setBlockPlugin:function(e,t){ this._blockPlugin[e]=t; }, _getContainer:function(){ return this.container; }, _setCover:function(e,t){ this.container.find(".js_poster_cover").css(t),this.opt.cover=e; }, _removeCover:function(e){ var e=e||{ "background-image":"none" }; this.container.find(".js_poster_cover").css(e); }, _afterReplay:function(){ this.__hasBeginPlay=!0,this.__userplaytime=!0,this.__firstPlayStart=+new Date,this.showLoading(), this.play(),this._trigger("afterReplay"); }, setSrc:function(e,t,i){ var o=this,n=this.$video,s=(this.opt,this.video); this.src=e,(!o.__iosPreloadPause||i)&&o.__initData(),o.__initVideo(),this.showCover(), o.log.loadwait_start=+new Date,(!n.attr("src")||i)&&(n.attr("src",e),v.proxyPreloadExper()&&v.proxyPreloadExper().isUsePreload&&_.os.ios&&!o.opt.ad_muted_btn&&!function(){ var e=function t(){ o.__iosPreloadPause=!0,s.pause(),o._trigger("ready",o.opt),s.removeEventListener("canplay",t,!1); }; s.addEventListener("canplay",e,!1),4!==s.readyState&&(o.__iosPreloadPlayFlag=!0, o.__iosIsRealPreload=!0,a(s,!0),s.play()); }()),s.preload=t||"metadata",n.on("loadedmetadata",function(){ if(o.__videoDurationchange(),o.__playQueue&&o.__playQueue.length>0){ var e=o.__playQueue[0].sec; o.__playQueue=[],o.play(e); } }),s.duration>0&&1!=s.duration&&o.__videoDurationchange(); }, videoCtlReport:function(){ var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=this.opt.extinfo; t&&h.report({ step:e.step, vid:t.vid, hit_bizuin:t.hit_bizuin, hit_vid:t.hit_vid, traceid:t.pageplayer._getTraceId(), orderid:t.pageplayer._getOrderid(), ori_status:t.pageplayer._getOriStatus(), type:this.opt.videoReportType, fromid:t.pageplayer._getFromid() }); }, replay:function(){ _.os.android,this._trigger("replay"); }, resetVideo:function(){ this.container.find(".js_video_poster").hide(),this.showCover(),this.__resetVideo(), this._trigger("loading"),this.__hasBeginPlay=!0; }, setSrcWithTime:function(e){ var t=this.video.currentTime; this.resetVideo(),this.setSrc(e,!1,!0),console.log("lastPlayTime",t,e),this.__continueSec=t; }, changeStatus:function(e){ var t=this._g; if(t.statusDefine[e.status]&&(!e.subStatus||t.subStatusDefine[e.subStatus]||"error"===e.status)&&(t.status!==e.status||t.subStatus!==e.subStatus)){ var i=0; "end"===e.status||"error"===e.status?(this._playingBufferingStartTime=null,this.__userplaytime=!1):"pause"===e.status?this._playingBufferingStartTime=null:"play"===e.status&&"playing"===e.subStatus&&null!==this._playingBufferingStartTime?(i=+new Date-this._playingBufferingStartTime, this._playingBufferingStartTime=null):!this.__hasBeginPlay||!this.__canplay||this.__userplaytime||"loading"!==e.status||"waiting"!==e.subStatus&&"seeking"!==e.subStatus||null!==this._playingBufferingStartTime||(this._playingBufferingStartTime=+new Date); var o=t.status,n=t.subStatus; t.status=e.status,t.subStatus=e.subStatus; var a="player statusChange, preStatus:"+o+"; status:"+t.status+"; preSubStatus:"+n+"; subStatus:"+t.subStatus; this._jsapiLog(a),C(a),p.broadcastMessage({ type:"statusChange", data:{ id:this.id, preStatus:o, preSubStatus:n, status:t.status, subStatus:t.subStatus } }),this._trigger("statusChange",{ currentTime:this.video.currentTime, preStatus:o, preSubStatus:n, status:t.status, subStatus:t.subStatus }),i&&this._trigger("playingBufferingTime",{ bufferingTime:i }); } }, play:function(e){ var t=this.video,i=this; if(!i.isEnd()){ if(!t||0==t.readyState)return void(this.__playQueue[0]={ sec:e }); e*=1; try{ if(isNaN(e)||"number"!=typeof e)i.__canplay&&i.isPause()||0==t.currentTime?t.play():t.currentTime=0;else{ var o=this.__getDuration(); e>=o&&(e=o-1),0>e&&(e=0),e=1*(1*e).toFixed(4),i.__last_playtime=e,i.__setPlayTime(e), t.currentTime==e?t.play():t.currentTime=e; } }catch(n){ 0==t.currentTime?t.play():t.currentTime=0; } } }, pause:function(){ var e=this.video; e&&0==e.readyState||(this.__replaySec=null,this.waitingHandlerTimer&&(clearTimeout(this.waitingHandlerTimer), this.waitingHandlerTimer=null),e.pause(),C(this.id+":pause function")); }, enterFullScreen:function(){ var e=this.video; e.requestFullscreen?(e.requestFullscreen(),this.__isInFullScreen=!0):e.mozRequestFullScreen?(e.mozRequestFullScreen(), this.__isInFullScreen=!0):e.webkitRequestFullscreen?(e.webkitRequestFullscreen(), this.__isInFullScreen=!0):e.webkitEnterFullscreen&&(e.webkitEnterFullscreen(),this.__isInFullScreen=!0); }, exitFullScreen:function(){ this.video; this.hideLoading(),document.webkitExitFullscreen&&document.webkitExitFullscreen(), this.__isInFullScreen=!1; }, isInFullScreen:function(){ return!!this.__isInFullScreen; }, play4outer:function(e){ this.__forcePause=!1,this.play(e),this._trigger("userplay"),this._hidePlayControllBar(); }, pause4outer:function(){ this.__forcePause=!0,this.hideLoading(),this.pause(),this._trigger("userpause"), this.hideControllBar(!0),this._showPlayControllBar(); }, setWidth:function(e){ this.container.find(".js_page_video").css({ width:e }); }, setHeight:function(e){ this.container.find(".js_page_video").css({ height:e }); }, showCover:function(){ this.container.find(".js_poster_cover").show(); }, hideCover:function(){ this.container.find(".js_poster_cover").hide(); }, showFuncControllBar:function(){ var e=this.container.find(".js_progress_bar,.js_full_screen_control"); e.show(),this.__hasFuncControllBar=!0; }, hideFuncControllBar:function(){ var e=this.container.find(".js_progress_bar,.js_full_screen_control"); e.hide(),this.__hasFuncControllBar=!1; }, showControllBar:function(){ this.__touchVideoTimeoutHandler&&clearTimeout(this.__touchVideoTimeoutHandler),this.__timerHideControll&&(clearTimeout(this.__timerHideControll), this.__timerHideControll=null),this.container.find(".js_controll").removeClass("opr_fade_out").show(); }, hideControllBar:function(e){ var t=this.container.find(".js_controll"); t.removeClass("opr_fade_in"); var i=this; i.__timerHideControll&&clearTimeout(i.__timerHideControll); var e=!1; e?t.hide():(t.addClass("opr_fade_out"),i.__timerHideControll=setTimeout(function(){ t.hide(); },500)); }, showLoading:function(e){ var t=this; this.__always_hide_loading||this.__isshowLoading&&this.video&&this.video.currentTime>1||(this.__isshowLoading=!0, this._g.resetShowingLoadingTimeoutId&&(clearTimeout(this._g.resetShowingLoadingTimeoutId), this._g.resetShowingLoadingTimeoutId=null),this._g.resetShowingLoadingTimeoutId=window.setTimeout(function(){ t.__isshowLoading=!1; },1e3),this._g.showingLoadingTimeoutId&&(clearTimeout(this._g.showingLoadingTimeoutId), this._g.showingLoadingTimeoutId=null),"firstTime"==e?this.container.find(".js_loading").addClass("start_loading").show():this._g.showingLoadingTimeoutId=setTimeout(function(){ t.container.find(".js_loading").show(); },800)); }, hideLoading:function(){ this.container.find(".js_loading").removeClass("start_loading").hide(),this._g.showingLoadingTimeoutId&&(clearTimeout(this._g.showingLoadingTimeoutId), this._g.showingLoadingTimeoutId=null); }, triggerMuted:function(e){ e?(a(this.video,!0),this.container.find(".js_muted_btn").addClass("muting")):(a(this.video,!1), this.container.find(".js_muted_btn").removeClass("muting")); }, setVideoCSS:function(e){ var t=this,i=t.container,o=i.find(".js_page_video"); o.css(e); }, hasFullScreen:function(){ return this.isInFullScreen(); }, hasDrag:function(){ return!!this.__has_drag; }, getCurTime:function(){ return this.video.currentTime; }, getEndDom:function(){ return this.container.find(".js_end_dom"); }, getDrag:function(){ return this.__dragTimes; }, getPlayTotalTime:function(){ return this.__endCountTime(),this.__play_total_time; }, getLog:function(){ var e=this.log||{}; return{ hasended:e.hasended, last_ms:Math.floor(1e3*(e.lastsec||0)), duration_ms:Math.floor(1e3*(e.duration||0)), video_error:e.video_error||0, video_error_code:e.video_error_code||0, loadwait:e.loadwait||0 }; }, isPlay:function(){ return!this.video.paused&&!this.isEnd(); }, isPause:function(){ return!!this.video.paused; }, isEnd:function(){ return!!this.video.ended; }, hasBeginPlay:function(){ return this.__hasBeginPlay; }, destroy:function(){ p.removeListener({ type:"broadcastPlay", func:this._event.broadcastPlay }); try{ delete P._players[this.id]; }catch(e){} P.visibilityPausePlayer===this&&(P.visibilityPausePlayer=null); } }),E._getFormatTime=M,E; });