"use weex:vue"; if (typeof Promise !== 'undefined' && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor return this.then( value => promise.resolve(callback()).then(() => value), reason => promise.resolve(callback()).then(() => { throw reason }) ) } }; if (typeof uni !== 'undefined' && uni && uni.requireGlobal) { const global = uni.requireGlobal() ArrayBuffer = global.ArrayBuffer Int8Array = global.Int8Array Uint8Array = global.Uint8Array Uint8ClampedArray = global.Uint8ClampedArray Int16Array = global.Int16Array Uint16Array = global.Uint16Array Int32Array = global.Int32Array Uint32Array = global.Uint32Array Float32Array = global.Float32Array Float64Array = global.Float64Array BigInt64Array = global.BigInt64Array BigUint64Array = global.BigUint64Array }; (()=>{var w=Object.create;var c=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var k=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!x.call(e,r)&&r!==i&&c(e,r,{get:()=>t[r],enumerable:!(n=f(t,r))||n.enumerable});return e};var C=(e,t,i)=>(i=e!=null?w(m(e)):{},k(t||!e||!e.__esModule?c(i,"default",{value:e,enumerable:!0}):i,e));var h=b((V,u)=>{u.exports=Vue});var o=C(h()),v={"fullscreen-page":{"":{position:"relative",backgroundColor:"#000000"}},"fullscreen-video":{"":{position:"absolute",left:0,top:0,backgroundColor:"#000000"}},"back-button":{"":{position:"absolute",left:"24rpx",top:"16rpx",zIndex:9999,width:"64rpx",height:"64rpx",borderRadius:"32rpx",backgroundColor:"rgba(0,0,0,0.72)",alignItems:"center",justifyContent:"center"}},"back-button-text":{"":{color:"#ffffff",fontSize:"52rpx",fontWeight:"400",textAlign:"center"}}},_=(e,t)=>{let i=e.__vccOpts||e;for(let[n,r]of t)i[n]=r;return i},P="fullscreen-live-player",S={data(){return{videoUrl:"",poster:"",initialTime:0,hasPrepared:!1,playerContext:null,windowWidth:375,windowHeight:667}},computed:{pageStyle(){return{width:`${this.windowWidth}px`,height:`${this.windowHeight}px`}},videoStyle(){return{width:`${this.windowWidth}px`,height:`${this.windowHeight}px`}}},onLoad(e){let t=uni.getSystemInfoSync();this.windowWidth=t.windowWidth||this.windowWidth,this.windowHeight=t.windowHeight||this.windowHeight,this.videoUrl=p(e&&e.videoUrl),this.poster=p(e&&e.poster),this.initialTime=y(e&&e.initialTime)},onReady(){this.playerContext=uni.createVideoContext(P,this),this.lockLandscape(),setTimeout(()=>{this.refreshWindowSize(),this.playerContext&&this.playerContext.play()},180)},onUnload(){this.playerContext&&this.playerContext.pause(),this.lockPortrait()},onBackPress(){return this.playerContext&&this.playerContext.pause(),this.lockPortrait(),!1},methods:{refreshWindowSize(){let e=uni.getSystemInfoSync();this.windowWidth=e.windowWidth||this.windowWidth,this.windowHeight=e.windowHeight||this.windowHeight},handleVideoReady(e){if(this.hasPrepared)return;this.hasPrepared=!0;let t=y(e&&e.detail&&e.detail.duration);this.initialTime>0&&t>0&&this.initialTime{uni.navigateBack()},120)}}};function p(e){if(typeof e!="string")return"";try{return decodeURIComponent(e)}catch(t){return e}}function y(e){let t=Number(e||0);return Number.isFinite(t)&&t>0?Math.floor(t):0}function T(e,t,i,n,r,s){return(0,o.openBlock)(),(0,o.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,o.createElementVNode)("view",{class:"fullscreen-page",style:(0,o.normalizeStyle)(s.pageStyle)},[(0,o.createElementVNode)("u-video",{id:"fullscreen-live-player",class:"fullscreen-video",style:(0,o.normalizeStyle)(s.videoStyle),src:r.videoUrl,poster:r.poster,initialTime:r.initialTime,controls:!1,autoplay:!0,showCenterPlayBtn:!1,showFullscreenBtn:!1,showPlayBtn:!1,showProgress:!1,enableProgressGesture:!1,objectFit:"contain",onLoadedmetadata:t[0]||(t[0]=(...l)=>s.handleVideoReady&&s.handleVideoReady(...l)),onCanplay:t[1]||(t[1]=(...l)=>s.handleVideoReady&&s.handleVideoReady(...l))},null,44,["src","poster","initialTime"]),(0,o.createElementVNode)("view",{class:"back-button",onClick:t[2]||(t[2]=(...l)=>s.closePlayer&&s.closePlayer(...l))},[(0,o.createElementVNode)("u-text",{class:"back-button-text"},"\u2039")])],4)])}var a=_(S,[["render",T],["styles",[v]]]);var d=plus.webview.currentWebview();if(d){let e=parseInt(d.id),t="pages/watchLiveFullscreen/watchLiveFullscreen",i={};try{i=JSON.parse(d.__query__)}catch(r){}a.mpType="page";let n=Vue.createPageApp(a,{$store:getApp({allowDefault:!0}).$store,__pageId:e,__pagePath:t,__pageQuery:i});n.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...a.styles||[]])),n.mount("#root")}})();