web3d
Version:
MetaEditor — ReactJS Pixel Streaming library, helps integrate Unreal Engine v.5 in the browser. Allows you to send commands and get callbacks from the stream server with launched Unreal Engine.
1 lines • 40.7 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _url=_interopRequireDefault(require("url")),_webRtcPlayer=_interopRequireDefault(require("./webRtcPlayer")),_middleware=require("./middleware/");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a0_0x277a85=a0_0x20d2;(function(e,t){for(const n=a0_0x20d2,o=e();;)try{const e=-parseInt(n(180))/1*(parseInt(n(458))/2)+-parseInt(n(497))/3+-parseInt(n(503))/4*(-parseInt(n(273))/5)+-parseInt(n(575))/6*(parseInt(n(424))/7)+parseInt(n(610))/8+-parseInt(n(344))/9*(-parseInt(n(395))/10)+parseInt(n(248))/11*(parseInt(n(307))/12);if(e===t)break;else o.push(o.shift())}catch(e){o.push(o.shift())}})(a0_0x2582,940116);let APP=null,receivedBytesMeasurement=null,receivedBytes=null,unquantizeAndDenormalizeUnsigned=null;function a0_0x20d2(e,t){const n=a0_0x2582();return a0_0x20d2=function(e){e-=144;let t=n[e];return t},a0_0x20d2(e,t)}if(typeof window!==a0_0x277a85(169)){function e(){const e=a0_0x277a85;let t=navigator.getGamepads?navigator[e(494)]():navigator[e(462)]?navigator.webkitGetGamepads():[];for(let n=0;n<t[e(400)];n++)t[n]&&t[n][e(515)]in fe&&(fe[t[n][e(515)]].currentState=t[n])}function t(){const i=a0_0x277a85;for(let t in e(),fe){let e=fe[t],s=e.currentState,r=e[i(370)];for(let e=0;e<s[i(222)].length;e++){let d=s[i(222)][e],l=r[i(222)][e];d.pressed&&!l.pressed?6==e?a(t,5,d.value):7==e?a(t,6,d.value):n(t,e,0):!d[i(465)]&&l.pressed?6==e?a(t,5,0):7==e?a(t,6,0):o(t,e):d[i(465)]&&l[i(465)]&&(6==e?a(t,5,d[i(191)]):7==e?a(t,6,d[i(191)]):n(t,e,1))}for(let e=0;e<s[i(334)][i(400)];e+=2){let n=parseFloat(s[i(334)][e].toFixed(4)),o=-parseFloat(s[i(334)][e+1][i(163)](4));0==e?(a(t,1,n),a(t,2,o)):2===e&&(a(t,3,n),a(t,4,o))}fe[t][i(370)]=s}ye(t)}function n(e,t,n){const o=a0_0x277a85;Data=new DataView(new ArrayBuffer(4)),Data.setUint8(0,Je[o(540)]),Data.setUint8(1,e),Data.setUint8(2,t),Data[o(314)](3,n)}function o(e,t){const n=a0_0x277a85;Data=new DataView(new ArrayBuffer(3)),Data.setUint8(0,Je[n(561)]),Data.setUint8(1,e),Data[n(314)](2,t)}function a(e,t,n){const o=a0_0x277a85;Data=new DataView(new ArrayBuffer(11)),Data[o(314)](0,Je[o(609)]),Data[o(314)](1,e),Data[o(314)](2,t),Data.setFloat64(3,n,!0),x(Data[o(257)])}function i(e){const n=a0_0x277a85;_middleware.MetaMsg[n(357)]("Gamepad connect handler"),gamepad=e[n(406)],fe[gamepad.index]={},fe[gamepad[n(515)]][n(262)]=gamepad,fe[gamepad.index][n(370)]=gamepad,_middleware.MetaMsg[n(357)](n(198)+gamepad.id+n(523)),ye(t)}function s(e){const t=a0_0x277a85;_middleware.MetaMsg[t(357)](t(185)),_middleware.MetaMsg[t(357)](t(198)+e.gamepad.id+t(530)),delete fe[e[t(406)].index]}function r(){const e=a0_0x277a85;window.addEventListener(e(472),W,!0),window.addEventListener(e(487),_),Me?(window[e(238)](e(183),i),window.addEventListener(e(347),s)):he&&(window[e(238)](e(292),i),window.addEventListener(e(322),s));let t=document.getElementById(e(364));t[e(238)](e(388),le);let n=document[e(283)](e(605));null!==n&&(n[e(287)]=function(){W()}),Re=document.getElementById("quality-control-ownership-tgl"),null!==Re&&(Re[e(287)]=function(){K()});let o=document[e(283)]("encoder-params-submit");null!==o&&(o[e(558)]=function(){const t=e;let n=document[t(283)]("encoder-min-qp-text")[t(191)],o=document.getElementById("encoder-max-qp-text")[t(191)];H({ConsoleCommand:t(177)+n}),H({ConsoleCommand:t(449)+o})});let a=document.getElementById(e(170));null!==a&&(a[e(558)]=function(){const t=e;let n=document[t(283)](t(534)).value,o=1e3*document[t(283)]("webrtc-min-bitrate-text").value,a=1e3*document[t(283)]("webrtc-max-bitrate-text")[t(191)];H({ConsoleCommand:t(236)+n}),H({ConsoleCommand:t(603)+o}),H({ConsoleCommand:t(390)+a})});let r=document[e(283)]("show-fps-button");null!==r&&(r[e(558)]=function(){H({ConsoleCommand:"Stat FPS"})});let c=document[e(283)](e(263));null!==c&&(c.onchange=function(){Ee=c.checked});let u=document[e(283)](e(431));null!==u&&(u[e(287)]=function(t){const n=e;let o=document[n(283)](n(247));o[n(311)][n(399)]=t[n(601)][n(452)]?n(455):n(300)});let m=document[e(283)](e(545));m&&(m[e(558)]=()=>{l()}),d("prefer-sfu-tgl",e(537)),d(e(202),e(315)),d(e(554),e(519))}function d(e,t){const n=a0_0x277a85;let o=document.getElementById(e);o&&(o[n(452)]=new URLSearchParams(window.location[n(560)])[n(617)](t),o[n(238)](n(256),e=>{const o=n,a=new URLSearchParams(window[o(233)][o(560)]);e[o(556)][o(452)]?a.set(t,o(301)):a["delete"](t),window.history.replaceState({},"",""===a[o(337)]()?""+location[o(599)]:location.pathname+"?"+a)}))}function l(){if(xe){let e=function(e){const t=a0_0x20d2;q(Je[t(377)],{StartTime:e})};xe.startLatencyTest(e)}}function c(e,t,n){const o=a0_0x277a85;return APP[o(261)]}function u(e){const t=a0_0x277a85;let n=document[t(568)](t(480));n.id=t(150),n[t(576)]=e?e:"",c(t(255),n)}function m(){const e=a0_0x277a85;xe&&xe.video?(xe[e(612)][e(214)]()["catch"](function(t){const n=e;_middleware.MetaMsg.error(t),_middleware.MetaMsg[n(357)](n(205)),g()}),G(),K(),U(),h()):_middleware.MetaMsg[e(172)](e(209))}function g(){const e=a0_0x277a85;let t=document.createElement(e(194));t.id="playButton",t[e(613)]=e(425),t.alt="Start Streaming",c(e(188),t,()=>{m()}),We=!1}function p(){const e=a0_0x277a85;_e.overlay.innerHTML=e(396)+_e[e(498)]+e(397)}function M(){const e=a0_0x277a85;y(),_e[e(261)]=document.createElement(e(480)),_e[e(261)].id="afkOverlay",c("clickableState",_e[e(261)],()=>{h(),clearInterval(_e[e(304)]),f()}),_e.countdown=_e.closeTimeout,p(),Xe[e(193)]==Ye[e(175)]&&document[e(393)](),_e[e(304)]=setInterval(function(){const t=e;_e[t(498)]--,0==_e[t(498)]?(h(),pe[t(473)]()):p()},1e3)}function h(){c("hiddenState")}function f(){const e=a0_0x277a85;_e[e(369)]=_e[e(376)],v()}function y(){_e[a0_0x277a85(369)]=!1}function v(){const e=a0_0x277a85;_e.active&&(clearTimeout(_e.warnTimer),_e[e(181)]=setTimeout(function(){M()},1e3*_e[e(277)]))}function b(){const e=a0_0x277a85;xe?(_middleware.MetaMsg[e(357)](e(588)),u(e(189)),xe[e(429)]()):(_middleware.MetaMsg[e(357)]("WebRTC player not setup, cannot create offer"),u("Unable to setup video"))}function x(e){xe&&(v(),xe[a0_0x277a85(356)](e))}function w(e,t){De[a0_0x277a85(552)](e,t)}function S(e){De.remove(e)}function T(e,t){function n(){const e=r;let t=btoa(ze[e(147)][e(320)]((t,n)=>t+String[e(270)](n),"")),n=document[e(283)](e(507)).childNodes[0];n.src="data:image/jpeg;base64,"+t,n[e(439)]=function(){const t=e;ze.height=n[t(445)],ze.width=n[t(381)],I(),We?(g(),W()):U(),xe.setVideoEnabled(!1)}}function o(e){const t=r;Ae[t(336)]||(Ae[t(407)]="",Ae[t(289)]="",Ae[t(336)]=!0,Ae.valid=!1,Ae[t(405)]=0,Ae[t(427)]=[],Ae[t(551)]=new Date()[t(341)](),_middleware.MetaMsg[t(357)]("Received first chunk of file"));let n=new TextDecoder("utf-16")[t(178)](e[t(572)](1));_middleware.MetaMsg.log(n),Ae[t(289)]=n}function a(e){const t=r;Ae[t(336)]||(Ae[t(407)]="",Ae[t(289)]="",Ae.receiving=!0,Ae[t(563)]=!1,Ae.size=0,Ae[t(427)]=[],Ae[t(551)]=new Date()[t(341)](),_middleware.MetaMsg[t(357)](t(491)));let n=new TextDecoder(t(208))[t(178)](e.slice(1));_middleware.MetaMsg[t(357)](n),Ae.mimetype=n}function i(e){const t=r;if(Ae.receiving){Ae[t(405)]=Math[t(353)](new DataView(e.slice(1,5)[t(257)])[t(321)](0,!0)/16379);let i=e.slice(5);if(Ae[t(427)][t(190)](i),_middleware.MetaMsg[t(357)](t(416)+Ae[t(427)][t(400)]+"/"+Ae.size),Ae[t(427)][t(400)]===Ae.size){Ae[t(336)]=!1,Ae[t(563)]=!0,_middleware.MetaMsg[t(357)](t(355));const e=new Date().getTime()-Ae[t(551)],i=Math[t(197)](1024*(16*Ae.size)/e);_middleware.MetaMsg[t(357)](t(423)+i+"kb/s over "+e/1e3+t(567));var n=new Blob(Ae[t(427)],{type:Ae[t(407)]}),o=document[t(568)]("a");o.setAttribute("href",URL[t(432)](n)),o[t(410)](t(528),"transfer."+Ae[t(289)]);var a=$(o);a.appendTo(t(578)),a[t(615)]()}else Ae.data[t(400)]>Ae[t(405)]&&(Ae[t(336)]=!1,_middleware.MetaMsg.error("Received bigger file than advertised: "+Ae[t(427)][t(400)]+"/"+Ae.size))}}function s(e){const t=r;ze[t(336)]||(ze[t(336)]=!0,ze[t(563)]=!1,ze[t(405)]=0,ze[t(147)]=void 0),ze[t(405)]=new DataView(e.slice(1,5)[t(257)])[t(321)](0,!0);let o=e[t(572)](5);if(ze[t(147)]){let e=new Uint8Array(ze.jpeg.length+o[t(400)]);e[t(552)](ze[t(147)],0),e[t(552)](o,ze[t(147)].length),ze[t(147)]=e}else ze[t(147)]=o,ze[t(336)]=!0,_middleware.MetaMsg[t(357)](t(260)+ze[t(147)].length+"/"+ze[t(405)]);ze[t(147)][t(400)]===ze[t(405)]?(ze[t(336)]=!1,ze[t(563)]=!0,_middleware.MetaMsg.log(t(535)+ze[t(405)]),n()):ze[t(147)][t(400)]>ze[t(405)]&&(_middleware.MetaMsg[t(172)](t(476)+ze[t(147)][t(400)]+"/"+ze[t(405)]),ze[t(147)]=void 0,ze[t(336)]=!1)}const r=a0_0x277a85;return xe=new _webRtcPlayer.default(t),e[r(583)](xe[r(612)]),e[r(583)](Ie),xe[r(232)]=function(e){const t=r;if(pe&&pe[t(288)]===ke){let n=JSON[t(297)](e);_middleware.MetaMsg[t(357)](t(477),t(310),e),pe.send(n)}},xe[r(245)]=function(e){const t=r;pe&&pe.readyState===ke&&pe[t(356)](JSON[t(297)]({type:t(342),candidate:e}))},xe[r(541)]=function(e){const t=r;if(pe&&pe[t(288)]===ke){let n=JSON[t(297)](e);_middleware.MetaMsg[t(357)](t(268),t(310),e),pe.send(n)}},xe[r(598)]=function(){const e=r;_middleware.MetaMsg[e(312)](e(215)),pe&&pe[e(288)]===ke&&(APP[e(598)](),We?(g(),W()):(W(),m()))},xe[r(168)]=function(){const e=r;pe&&pe.readyState===ke&&(_middleware.MetaMsg[e(357)](e(443)),K())},(xe[r(254)]=function(){const e=r;xe.video&&xe[e(612)][e(606)]&&xe[e(598)]&&xe[e(598)]()},xe.onDataChannelMessage=function(e){const t=r;let n=new Uint8Array(e);if(APP.onDataChannelMessage(n),n[0]===qe[t(547)]){let e=0!==n[1];_middleware.MetaMsg[t(357)](t(581)+e),Le=e,null!==Re&&(Re[t(579)]=e,Re[t(452)]=e)}else if(n[0]===qe[t(508)]){let n=new TextDecoder(t(208))[t(178)](e[t(572)](1));for(let e of De.values())e(n)}else if(n[0]===qe[t(372)]){let n=new TextDecoder("utf-16")[t(178)](e.slice(1));_middleware.MetaMsg[t(357)](n);let o=JSON[t(237)](n);o[t(367)]===t(158)&&te(o)}else if(n[0]===qe[t(446)])s(n);else if(n[0]===qe[t(152)])D();else if(n[0]===qe[t(460)])Qe=new TextDecoder(t(208))[t(178)](e[t(572)](1));else if(n[0]==qe[t(377)]){let n=new TextDecoder(t(208))[t(178)](e[t(572)](1));_middleware.MetaMsg[t(357)](t(383)),_middleware.MetaMsg[t(357)](n);let o=JSON[t(237)](n);xe&&xe.latencyTestTimings[t(486)](o)}else if(n[0]==qe[t(157)]){let n=new TextDecoder(t(208))[t(178)](e.slice(1)),o=JSON[t(237)](n);if(o[t(217)]){let e=o[t(217)].AllowPixelStreamingCommands;if(!1===e){if(document.getElementById(t(299))[t(579)]=!0,document[t(283)]("encoder-max-qp-text")[t(579)]=!0,document[t(283)]("webrtc-fps-text")[t(579)]=!0,document[t(283)]("webrtc-min-bitrate-text")[t(579)]=!0,document[t(283)]("webrtc-max-bitrate-text")[t(579)]=!0,document[t(283)](t(176))[t(579)]=!0,document.getElementById(t(531)).disabled=!0,document.getElementById("webrtc-params-submit")[t(579)]=!0,!document[t(283)](t(516))){let e=document[t(568)]("p");e[t(368)]=t(282),e[t(435)]=t(565),e.id=t(516),document[t(283)](t(469))[t(583)](e)}if(!document[t(283)](t(207))){let e=document[t(568)]("p");e[t(368)]=t(282),e[t(435)]=t(565),e.id="warning-elem-encoder",document.getElementById(t(206))[t(583)](e)}_middleware.MetaMsg.warn(t(414))}let n=o[t(217)][t(505)];n&&(document[t(283)](t(545))[t(579)]=!0,document[t(283)](t(545)).title=t(375),_middleware.MetaMsg[t(441)](t(240)))}o[t(448)]&&(document[t(283)]("encoder-min-qp-text")[t(191)]=o[t(448)].MinQP,document.getElementById(t(532))[t(191)]=o.Encoder[t(319)]),o[t(164)]&&(document[t(283)](t(534))[t(191)]=o.WebRTC[t(471)],document[t(283)](t(417))[t(191)]=o[t(164)].MinBitrate/1e3,document[t(283)](t(253))[t(191)]=o[t(164)][t(279)]/1e3)}else n[0]==qe.FileExtension?o(n):n[0]==qe[t(333)]?a(n):n[0]==qe.FileContents?i(n):_middleware.MetaMsg[t(172)](t(174)+n[0])},Z(xe[r(612)]),"ontouchstart"in document[r(269)]&&ee(e),b(),xe[r(612)])}function C(){const e=a0_0x277a85;xe.aggregateStats(1000);let t=300000;xe[e(316)]=n=>{const o=e;APP[o(316)](n);let a=new Intl[o(571)](window[o(456)][o(201)],{maximumFractionDigits:0}),i=new Intl.NumberFormat(window.navigator.language,{maximumFractionDigits:0,minimumIntegerDigits:2}),s=(n.timestamp-n[o(551)])/1e3,r=[],d=[60,60];for(let e=0;e<d[o(400)];e++)r[o(190)](s%d[e]),s/=d[e];r[o(190)](s);let l=r[0],c=Math.floor(r[1]),u=Math[o(464)]([r[2]]);receivedBytesMeasurement="B",receivedBytes=n[o(293)](o(555))?n[o(555)]:0;let m=["kB","MB","GB"];for(let e=0;e<m[o(400)]&&!(receivedBytes<100000);e++)receivedBytes/=1e3,receivedBytesMeasurement=m[e];let g=document[o(283)](o(474)),p=function(e){let t=e,n=1,o=setInterval(function(){const e=a0_0x20d2;n-=.1,g[e(311)]=e(526)+Math[e(361)](2*(n-.5)),.1>=n&&(0==--t?clearInterval(o):n=1)},100/e)};APP[o(403)](Qe);let M="",h=o(527);Qe>35?(h="red",p(2),M+=o(389)+h+"\">Very blocky encoding quality</div>"):Qe>26&&(h=o(352),p(1),M+="<div style=\"color: "+h+o(559)),g.className=h+"Status",M+=o(203)+i[o(230)](u)+":"+i.format(c)+":"+i[o(230)](l)+o(611),M+=o(182)+(n[o(293)](o(418))&&n[o(418)]&&n.hasOwnProperty(o(281))&&n.frameHeight?n[o(418)]+"x"+n[o(281)]:o(199))+"</div>",M+=o(228)+receivedBytesMeasurement+o(351)+a[o(230)](receivedBytes)+o(611),M+=o(420)+(n.hasOwnProperty(o(267))?a[o(230)](n.framesDecoded):o(199))+o(611),M+=o(520)+(n.hasOwnProperty(o(384))?a.format(n[o(384)]):o(199))+"</div>",M+=o(426)+(n[o(293)](o(196))?a[o(230)](n[o(196)]):"Chrome only")+o(611),M+=o(447)+(n[o(293)](o(161))?a[o(230)](n[o(161)]):o(199))+o(611),M+=o(549)+(n[o(293)](o(285))?a[o(230)](1e3*n.currentRoundTripTime):o(411))+"</div>",M+=o(550)+(n[o(293)](o(546))?a[o(230)](n[o(546)]):"Chrome only")+"</div>",M+=o(389)+h+"\">Bitrate (kbps): "+(n[o(293)]("bitrate")?a[o(230)](n[o(577)]):"Chrome only")+o(611),M+=o(389)+h+o(235)+Qe+o(611);let f=document[o(283)](o(308));f.innerHTML=M,we&&n[o(551)]&&n[o(461)]-n[o(551)]>t&&(pe&&pe[o(288)]===ke&&(_middleware.MetaMsg[o(357)](o(200)+JSON[o(297)](n)),pe[o(356)](JSON.stringify({type:o(308),data:n}))),t+=300000)},xe[e(481)].OnAllLatencyTimingsReady=function(t){const n=e;if(!t.BrowserReceiptTimeMs)return;let o=t.BrowserReceiptTimeMs-t[n(584)],a=t.UEEncodeMs,i=t[n(243)],s=t[n(496)]-t[n(366)],r=o-s,d=null,l=null;t[n(326)]&&t.BrowserReceiptTimeMs&&(d=t[n(326)]+r+(typeof i===n(597)?0:i),l=t.FrameDisplayDeltaTimeMs+(o-r-s));let c="";c+="<div>Net latency RTT (ms): "+r.toFixed(2)+n(611),c+=n(160)+("string"==typeof a?a:a.toFixed(2))+n(611),c+=n(573)+("string"==typeof i?i:i[n(163)](2))+n(611),c+=n(482)+s[n(163)](2)+n(611),c+=t[n(326)]&&t[n(252)]?n(155)+t[n(326)].toFixed(2)+n(611):"",c+=l?n(385)+l[n(163)](2)+n(611):"",c+=d?n(306)+d[n(163)](2)+n(611):"",document.getElementById(n(415)).innerHTML=c}}function k(e){xe[a0_0x277a85(340)](e),C()}function R(e){xe[a0_0x277a85(313)](e),C()}function E(e){xe&&xe[a0_0x277a85(229)](e)}function B(e){const t=a0_0x277a85;let n=e[t(521)](t(539)),o=window[t(518)]/window.innerWidth,a=e.clientHeight/e.clientWidth,i=n[t(149)]/n.videoWidth;isNaN(i)?(Oe=window[t(529)],He=window[t(518)],Ge=0,Ke=0,e.style=t(343)+Ge+t(296)+Ke+t(421)+Oe+t(600)+He+t(470)+Ve+"; "+Ne):o<a?(Oe=Math.floor(window.innerHeight/i),He=window[t(518)],Ge=0,Ke=Math[t(464)](.5*(window[t(529)]-Oe)),e.style=t(343)+Ge+t(296)+Ke+t(421)+Oe+t(600)+He+t(470)+Ve+"; "+Ne):(Oe=window[t(529)],He=Math[t(464)](window.innerWidth*i),Ge=Math[t(464)](.5*(window[t(518)]-He)),Ke=0,e[t(311)]=t(343)+Ge+"px; left: "+Ke+t(421)+Oe+t(600)+He+t(470)+Ve+"; "+Ne)}function F(e){const t=a0_0x277a85;let n=e[t(521)](t(539));if(0<n.length){Oe=n[0][t(325)],He=n[0][t(149)];let o=Math[t(464)](.5*(window[t(518)]-He)),a=Math[t(464)](.5*(window[t(529)]-Oe));Ge=0<o?o:0,Ke=0<a?a:0,e[t(311)]="top: "+Ge+t(296)+Ke+"px; width: "+Oe+t(600)+He+t(470)+Ve+"; "+Ne}}function P(e){const t=a0_0x277a85;e[t(521)](t(539));e[t(311)]=t(278)+Oe+t(600)+He+t(470)+Ve+"; "+Ne}function L(){const e=a0_0x277a85;Ie=document[e(568)](e(480)),Ie.id="freezeFrameOverlay",Ie[e(311)][e(399)]=e(300),Ie.style[e(246)]=e(300),Ie.style[e(249)]=e(596),Ie[e(311)][e(225)]="20";let t=document[e(568)](e(194));t[e(311)][e(249)]=e(596),Ie[e(583)](t)}function U(){const e=a0_0x277a85;ze.valid&&(Ie.classList[e(226)](e(360)),Ie[e(311)][e(399)]=e(455))}function D(){const e=a0_0x277a85;Ie[e(311)][e(399)]=e(300),ze[e(563)]=!1,Ie.classList.remove(e(360)),xe&&xe[e(548)](!0)}function I(){const e=a0_0x277a85;if(0!==ze.width&&0!==ze[e(506)]){let t=0,n=0,o=0,a=0,i=document[e(283)](e(605)),s=document[e(283)]("player");if(null!==i&&i[e(452)]){let i=window[e(529)]/window[e(518)],s=ze[e(553)]/ze[e(506)];i<s?(t=window[e(529)],n=Math[e(464)](window[e(529)]/s),o=Math[e(464)](.5*(window[e(518)]-n)),a=0):(t=Math[e(464)](window[e(518)]*s),n=window[e(518)],o=0,a=Math[e(464)](.5*(window.innerWidth-t)))}else{let i=s.offsetWidth/s[e(582)],r=ze[e(553)]/ze[e(506)];i<r?(t=s.offsetWidth,n=Math[e(464)](s[e(195)]/r),o=Math[e(464)](.5*(s[e(582)]-n)),a=0):(t=Math.floor(s[e(582)]*r),n=s[e(582)],o=0,a=Math[e(464)](.5*(s[e(195)]-t)))}let r=document[e(283)](e(507))[e(241)][0];Ie[e(311)].width=s[e(195)]+"px",Ie[e(311)][e(506)]=s[e(582)]+"px",Ie[e(311)].left="0px",Ie[e(311)][e(219)]="0px",r[e(311)][e(553)]=t+"px",r[e(311)][e(506)]=n+"px",r[e(311)].left=a+"px",r[e(311)].top=o+"px"}}function W(){const e=a0_0x277a85;let t=document[e(283)](e(259));if(t){if(A(),t[e(435)][e(365)](e(211)))return void z(t);let n=document[e(283)](e(605)),o=window[e(529)]<t[e(325)]||window[e(518)]<t[e(149)];null===n?P(t):n[e(452)]||o?B(t):F(t),z(t)}}function z(e){Ze=e[a0_0x277a85(224)](),N(),I()}function A(){const e=a0_0x277a85;if(Ee){let t=new Date()[e(341)]();if(1e3<t-Ue){let t=document[e(283)](e(259));if(!t)return;let n={ConsoleCommand:e(562)+t.clientWidth+"x"+t.clientHeight};H(n),_middleware.MetaMsg.log(n),Ue=new Date()[e(341)]()}else _middleware.MetaMsg.log(e(271)),clearTimeout(Be),Be=setTimeout(A,1e3)}}function _(){clearTimeout(je),je=setTimeout(function(){W()},500)}function q(e,t){const n=a0_0x277a85;let o=JSON.stringify(t),a=new DataView(new ArrayBuffer(3+2*o[n(400)])),i=0;a.setUint8(i,e),i++,a[n(244)](i,o[n(400)],!0),i+=2;for(let s=0;s<o[n(400)];s++)a[n(244)](i,o[n(404)](s),!0),i+=2;x(a[n(257)])}function O(e){q(Je[a0_0x277a85(614)],e)}function H(e){q(Je.Command,e)}function G(){x(new Uint8Array([Je[a0_0x277a85(398)]]).buffer)}function K(){Le||x(new Uint8Array([Je.RequestQualityControl])[a0_0x277a85(257)])}function N(){const e=a0_0x277a85;let t=document[e(283)](e(259)),n=t.getElementsByTagName("video");if(t&&0<n[e(400)]){let o=t[e(463)]/t[e(500)],a=n[0][e(149)]/n[0].videoWidth;if(o>a){Se&&_middleware.MetaMsg[e(357)](e(589));let n=o/a;$e=(o,a)=>{const i=e;let s=o/t[i(500)],r=n*(a/t[i(463)]-.5)+.5;return 0>s||1<s||0>r||1<r?{inRange:!1,x:65535,y:65535}:{inRange:!0,x:65536*s,y:65536*r}},unquantizeAndDenormalizeUnsigned=(o,a)=>{const i=e;return{x:o/65536*t[i(500)],y:((a/65536-.5)/n+.5)*t[i(463)]}},et=(o,a)=>{let i=o/(.5*t.clientWidth),s=n*a/(.5*t[e(463)]);return{x:32767*i,y:32767*s}}}else{Se&&_middleware.MetaMsg[e(357)]("Setup Normalize and Quantize for playerAspectRatio <= videoAspectRatio");let n=a/o;$e=(o,a)=>{const i=e;let s=n*(o/t[i(500)]-.5)+.5,r=a/t[i(463)];return 0>s||1<s||0>r||1<r?{inRange:!1,x:65535,y:65535}:{inRange:!0,x:65536*s,y:65536*r}},unquantizeAndDenormalizeUnsigned=(o,a)=>{return{x:((o/65536-.5)/n+.5)*t.clientWidth,y:a/65536*t[e(463)]}},et=(o,a)=>{let i=n*o/(.5*t[e(500)]),s=a/(.5*t.clientHeight);return{x:32767*i,y:32767*s}}}}}function Q(e,t,n,o){const a=a0_0x277a85;Se&&_middleware.MetaMsg[a(357)](a(495)+e+", y:"+t+a(331)+n+", dY: "+o);let i=$e(e,t),s=et(n,o),r=new DataView(new ArrayBuffer(9));r[a(314)](0,Je.MouseMove),r[a(244)](1,i.x,!0),r.setUint16(3,i.y,!0),r[a(286)](5,s.x,!0),r[a(286)](7,s.y,!0),x(r.buffer)}function V(e,t,n){const o=a0_0x277a85;Se&&_middleware.MetaMsg[o(357)](o(466)+e+o(593)+t+", "+n+")");let a=$e(t,n),i=new DataView(new ArrayBuffer(6));i[o(314)](0,Je[o(591)]),i.setUint8(1,e),i[o(244)](2,a.x,!0),i[o(244)](4,a.y,!0),x(i[o(257)])}function Y(e,t,n){const o=a0_0x277a85;Se&&_middleware.MetaMsg.log("mouse button "+e+o(159)+t+", "+n+")");let a=$e(t,n),i=new DataView(new ArrayBuffer(6));i.setUint8(0,Je.MouseUp),i[o(314)](1,e),i[o(244)](2,a.x,!0),i[o(244)](4,a.y,!0),x(i.buffer)}function j(e,t,n){const o=a0_0x277a85;Se&&_middleware.MetaMsg[o(357)](o(436)+e+o(409)+t+", "+n+")");let a=$e(t,n),i=new DataView(new ArrayBuffer(7));i[o(314)](0,Je.MouseWheel),i[o(286)](1,e,!0),i.setUint16(3,a.x,!0),i[o(244)](5,a.y,!0),x(i[o(257)])}function X(e,t,n){const o=a0_0x277a85;e&nt[o(318)]&&Y(tt[o(329)],t,n),e&nt[o(144)]&&Y(tt[o(144)],t,n),e&nt[o(265)]&&Y(tt[o(265)],t,n),e&nt[o(216)]&&Y(tt.FourthButton,t,n),e&nt[o(154)]&&Y(tt[o(154)],t,n)}function J(e,t,n){const o=a0_0x277a85;e&nt[o(318)]&&V(tt.MainButton,t,n),e&nt[o(144)]&&V(tt[o(144)],t,n),e&nt[o(265)]&&V(tt[o(265)],t,n),e&nt[o(216)]&&V(tt[o(216)],t,n),e&nt[o(154)]&&V(tt[o(154)],t,n)}function Z(e){e&&(ne(e),ie(e))}function ee(e){const t=a0_0x277a85;null===document[t(283)](t(339))&&(Pe=document[t(568)](t(618)),Pe.id=t(339),Pe[t(275)]=0,e[t(583)](Pe)),null===document[t(283)](t(402))&&(Fe=document.createElement(t(475)),Fe.id=t(402),Fe[t(576)]=t(379),e[t(583)](Fe),Fe[t(435)][t(226)](t(434)),Fe[t(238)](t(388),function(){Pe[t(210)]()}))}function te(e){const t=a0_0x277a85;if(e[t(538)]){Fe[t(435)].remove("hiddenState");let n=unquantizeAndDenormalizeUnsigned(e.x,e.y);Fe[t(311)][t(219)]=n.y[t(337)]()+"px",Fe[t(311)][t(570)]=(n.x-40).toString()+"px"}else Fe[t(435)][t(226)](t(434)),Pe[t(204)]()}function ne(e){const t=a0_0x277a85;e[t(218)]=function(n){const o=t;Se&&_middleware.MetaMsg.log(o(587));let a=new DataView(new ArrayBuffer(1));a[o(314)](0,Je.MouseEnter),x(a[o(257)]),e[o(517)](n)},e[t(490)]=function(n){const o=t;Se&&_middleware.MetaMsg[o(357)](o(422));let a=new DataView(new ArrayBuffer(1));a[o(314)](0,Je.MouseLeave),x(a.buffer),e[o(380)](n)}}function oe(e){function t(){const t=o;document[t(525)]===e||document.mozPointerLockElement===e?(_middleware.MetaMsg[t(357)](t(303)),document[t(238)]("mousemove",n,!1)):(_middleware.MetaMsg.log("The pointer lock status is now unlocked"),document[t(444)](t(453),n,!1))}function n(e){const t=o;a+=e[t(501)],i+=e[t(354)],a>Oe&&(a-=Oe),i>He&&(i-=He),0>a&&(a=Oe+a),0>i&&(i=He-i),Q(a,i,e[t(501)],e[t(354)])}const o=a0_0x277a85;let a=e.width/2,i=e.height/2;e.requestPointerLock=e.requestPointerLock||e[o(295)],document[o(393)]=document[o(393)]||document[o(187)],e.onclick=function(){e[o(227)]()},document[o(238)]("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),e[o(251)]=function(e){V(e[o(475)],a,i)},e[o(574)]=function(e){Y(e[o(475)],a,i)},e.onmousewheel=function(e){j(e[o(305)],a,i)},e[o(517)]=function(e){J(e[o(222)],a,i)},e[o(380)]=function(e){X(e[o(222)],a,i)}}function ae(e){const t=a0_0x277a85;_middleware.MetaMsg[t(312)](t(510)),Ve=APP[t(165)],e[t(450)]=function(e){const n=t;APP[n(468)].mouseDownMove(),Q(e[n(213)],e[n(350)],e[n(501)],e.movementY),e[n(536)]()},e[t(251)]=function(e){const n=t;APP[n(468)][n(221)](!0),V(e[n(475)],e.offsetX,e[n(350)]),e[n(536)]()},e.onmouseup=function(e){const n=t;APP[n(468)][n(221)](!1),Y(e[n(475)],e.offsetX,e.offsetY),e.preventDefault()},e[t(467)]=function(e){const n=t;Y(e[n(475)],e.offsetX,e.offsetY),e[n(536)]()},"onmousewheel"in e?e[t(192)]=function(e){const n=t;j(e[n(305)],e[n(213)],e.offsetY),e[n(536)]()}:e.addEventListener(t(489),function(e){const n=t;j(-120*e[n(291)],e[n(213)],e[n(350)]),e[n(536)]()},!1),e[t(517)]=function(e){J(e.buttons,e.offsetX,e[t(350)])},e[t(380)]=function(e){const n=t;X(e[n(222)],e[n(213)],e[n(350)])}}function ie(e){function t(e){const t=a0_0x20d2;let n=i[t(620)]();n===void 0&&_middleware.MetaMsg[t(357)](t(442)),s[e[t(348)]]=n}function n(e){const t=a0_0x20d2;i[t(190)](s[e.identifier]),delete s[e[t(348)]]}function o(t,n){const o=a0_0x20d2;let a=new DataView(new ArrayBuffer(2+7*n[o(400)]));a.setUint8(0,t),a[o(314)](1,n[o(400)]);let i=2;for(let r=0;r<n.length;r++){let t=n[r],d=t.clientX-e[o(621)],l=t[o(408)]-e[o(479)];Se&&_middleware.MetaMsg[o(357)]("F"+s[t[o(348)]]+"=("+d+", "+l+")");let c=$e(d,l);a.setUint16(i,c.x,!0),i+=2,a.setUint16(i,c.y,!0),i+=2,a[o(314)](i,s[t[o(348)]],!0),i+=1,a[o(314)](i,255*t[o(580)],!0),i+=1,a[o(314)](i,c[o(483)]?1:0,!0),i+=1}x(a.buffer)}const a=a0_0x277a85;let i=[9,8,7,6,5,4,3,2,1,0],s={};if(Xe.fakeMouseWithTouches){let t;e.ontouchstart=function(n){const o=a0_0x20d2;if(t===void 0){let a=n[o(433)][0];t={id:a.identifier,x:a[o(512)]-Ze[o(570)],y:a[o(408)]-Ze.top},e.onmouseenter(n),V(tt[o(329)],t.x,t.y)}n[o(536)]()},e.ontouchend=function(n){const o=a0_0x20d2;for(let a,i=0;i<n[o(433)][o(400)];i++)if(a=n.changedTouches[i],a[o(348)]===t.id){let i=a[o(512)]-Ze[o(570)],s=a.clientY-Ze[o(219)];Y(tt[o(329)],i,s),e[o(490)](n),t=void 0;break}n[o(536)]()},e[a(179)]=function(e){const n=a;for(let o,a=0;a<e[n(533)][n(400)];a++)if(o=e.touches[a],o.identifier===t.id){let e=o[n(512)]-Ze.left,a=o[n(408)]-Ze[n(219)];Q(e,a,e-t.x,a-t.y),t.x=e,t.y=a;break}e.preventDefault()}}else e[a(274)]=function(e){const n=a;for(let o=0;o<e[n(433)][n(400)];o++)t(e[n(433)][o]);Se&&_middleware.MetaMsg.log(n(362)),o(Je[n(566)],e[n(433)]),e[n(536)]()},e[a(327)]=function(e){const t=a;Se&&_middleware.MetaMsg[t(357)](t(437)),o(Je[t(492)],e[t(433)]);for(let o=0;o<e.changedTouches[t(400)];o++)n(e[t(433)][o]);e[t(536)]()},e[a(179)]=function(e){const t=a;Se&&_middleware.MetaMsg[t(357)]("touch move"),o(Je[t(590)],e[t(533)]),e.preventDefault()}}function se(e){return 112<=e&&123>=e||9===e}function re(e){const t=a0_0x277a85;return e[t(542)]===ot[t(358)]&&e[t(373)]===t(156)?ot[t(457)]:e.keyCode===ot[t(250)]&&"ControlRight"===e[t(373)]?ot[t(145)]:e[t(542)]===ot[t(298)]&&e[t(373)]===t(511)?ot[t(258)]:e[t(542)]}function de(){const e=a0_0x277a85;document[e(430)]=function(t){const n=e;Se&&_middleware.MetaMsg[n(357)](n(153)+t.keyCode+n(604)+t[n(280)]),x(new Uint8Array([Je[n(290)],re(t),t.repeat])[n(257)]),t[n(542)]===ot[n(349)]&&document[n(173)]({charCode:ot[n(349)]}),Xe[n(332)]&&se(t[n(542)])&&t[n(536)]()},document[e(338)]=function(t){const n=e;Se&&_middleware.MetaMsg[n(357)](n(212)+t[n(542)]),x(new Uint8Array([Je.KeyUp,re(t)])[n(257)]),Xe[n(332)]&&se(t[n(542)])&&t[n(536)]()},document.onkeypress=function(t){const n=e;Se&&_middleware.MetaMsg[n(357)]("key press "+t[n(146)]);let o=new DataView(new ArrayBuffer(3));o.setUint8(0,Je[n(544)]),o.setUint16(1,t[n(146)],!0),x(o[n(257)])}}function le(){const e=a0_0x277a85;let t=document[e(283)](e(261));t[e(435)][e(345)](e(264))}function ce(){const e=a0_0x277a85;_middleware.MetaMsg[e(312)](e(220));let t=document[e(283)](e(474));t&&(t.className="grey-status");let n=document[e(283)](e(308));n&&(n[e(576)]=e(569)),!Te||Ce?(D(),We=!1,W()):ue()}function ue(){const e=a0_0x277a85;if(window[e(302)]=window.WebSocket||window[e(371)],!window[e(302)])return void alert(e(294));const t=window[e(387)];pe=t?new WebSocket(APP[e(392)]):new WebSocket(window[e(233)][e(493)][e(166)](e(451),e(186)).replace("https://","wss://")),pe[e(346)]=function(t){const n=e;_middleware.MetaMsg[n(312)](n(428)),_middleware.MetaMsg[n(357)](n(524)+t[n(427)]);let o=JSON.parse(t.data);APP.ws.onmessage(o,t[n(427)]),o.type===n(324)?(_middleware.MetaMsg[n(357)](n(401),n(184),o),me(o)):o.type===n(592)?_middleware.MetaMsg[n(357)]("%c[Inbound SS (playerCount)]","background: lightblue; color: black",o):"offer"===o.type?(_middleware.MetaMsg[n(357)](n(272),n(184),o),k(o)):o.type===n(234)?(_middleware.MetaMsg[n(357)](n(382),"background: lightblue; color: black",o),R(o)):o[n(374)]===n(342)?E(o[n(276)]):o[n(374)]===n(317)&&o[n(317)]?_middleware.MetaMsg.log(o[n(317)]):_middleware.MetaMsg[n(357)](n(167)+o.type)},pe.onerror=function(t){const n=e;console.error(n(323),t),_middleware.MetaMsg[n(312)]("ws.onerror"),_middleware.MetaMsg[n(357)](n(478)+JSON.stringify(t)),APP.ws[n(242)](t[n(373)],t.reason)},pe[e(557)]=function(t){const n=e;_middleware.MetaMsg[n(312)]("ws.onclose"),APP.ws[n(557)](t[n(373)],t[n(171)]),_middleware.MetaMsg.log(n(459)+JSON[n(297)](t[n(373)])+n(412)+t[n(171)]),pe=void 0,Ce=!0;let o=document.getElementById("player");xe&&(o[n(266)](xe[n(612)]),xe[n(473)](),xe=void 0),u(n(586)+t[n(171)]);setTimeout(ce,4e3)}}function me(e){const t=a0_0x277a85;_middleware.MetaMsg.func(t(148));let n=document[t(283)](t(259)),o=T(n,e);switch(W(),Xe[t(193)]){case Ye.HoveringMouse:ae(o);break;case Ye[t(175)]:oe(o);break;default:_middleware.MetaMsg.log("ERROR: Unknown control scheme "+Xe[t(193)]),oe(o);}}function ge(){r(),L(),de(),ue()}let pe,Me=(a0_0x277a85(502)in window),he=(a0_0x277a85(513)in window),fe={},ye=window[a0_0x277a85(616)]||window[a0_0x277a85(328)]||window[a0_0x277a85(484)],ve=document[a0_0x277a85(608)](a0_0x277a85(359)),be=typeof ve.initKeyboardEvent===a0_0x277a85(169)?a0_0x277a85(602):a0_0x277a85(330),xe=null,we=!1,Se=!1,Te=!0,Ce=!1;const ke=1;let Re,Ee,Be,Fe,Pe,Le=!1,Ue=new Date()[a0_0x277a85(341)](),De=new Map,Ie=null,We=!1,ze={receiving:!1,size:0,jpeg:void 0,height:0,width:0,valid:!1},Ae={mimetype:"",extension:"",receiving:!1,size:0,data:[],valid:!1,timestampStart:void 0},_e={enabled:!1,warnTimeout:120,closeTimeout:10,active:!1,overlay:void 0,warnTimer:void 0,countdown:0,countdownTimer:void 0};const qe={QualityControlOwnership:0,Response:1,Command:2,FreezeFrame:3,UnfreezeFrame:4,VideoEncoderAvgQP:5,LatencyTest:6,InitialSettings:7,FileExtension:8,FileMimeType:9,FileContents:10};let Oe,He,Ge,Ke,Ne,Qe=a0_0x277a85(162),Ve=a0_0x277a85(485);const Ye={LockedMouse:0,HoveringMouse:1};let je,Xe={controlScheme:Ye[a0_0x277a85(175)],suppressBrowserKeys:!0,fakeMouseWithTouches:!1};const Je={IFrameRequest:0,RequestQualityControl:1,FpsRequest:2,AverageBitrateRequest:3,StartStreaming:4,StopStreaming:5,LatencyTest:6,RequestInitialSettings:7,UIInteraction:50,Command:51,KeyDown:60,KeyUp:61,KeyPress:62,MouseEnter:70,MouseLeave:71,MouseDown:72,MouseUp:73,MouseMove:74,MouseWheel:75,TouchStart:80,TouchEnd:81,TouchMove:82,GamepadButtonPressed:90,GamepadButtonReleased:91,GamepadAnalog:92};let Ze,$e,et;const tt={MainButton:0,AuxiliaryButton:1,SecondaryButton:2,FourthButton:3,FifthButton:4},nt={PrimaryButton:1,SecondaryButton:2,AuxiliaryButton:4,FourthButton:8,FifthButton:16},ot={BackSpace:8,Shift:16,Control:17,Alt:18,RightShift:253,RightControl:254,RightAlt:255};class at extends _middleware.MetaLogic{constructor(...e){const t=a0_0x277a85;super(...e),this[t(223)]=0,this[t(438)]=!1,this[t(151)]=!0,this[t(440)]=0,this[t(165)]=t(509),typeof window!==t(169)&&(window.ps_funcs={sendStartLatencyTest:()=>l()})}[a0_0x277a85(598)](){const e=a0_0x277a85;_middleware.MetaMsg.func(e(543),"onVideoInitialised");this.initialised||(xe&&(xe[e(612)].muted=!0,xe[e(612)][e(585)]=!0,this[e(151)]&&(xe.video[e(522)]=!0,xe.video[e(214)]())),h(),f())}get[a0_0x277a85(468)](){const e=e=>{const t=a0_0x20d2;this[t(386)]=e,e||this.actions.onMouseMove(!1)},t=()=>{const e=a0_0x20d2;this.mouse_down&&this.actions[e(564)](!0)};return{mouseDown:e,mouseDownMove:t}}get["ws"](){const e=(e,t)=>{const n=a0_0x20d2;_middleware.MetaMsg.log("onmessage",{msg:e,data:t}),e.type===n(592)&&(this.usersCount=e.count-1,this.actions[n(363)](this[n(223)]))},t=(e,t)=>{const n=a0_0x20d2;_middleware.MetaMsg[n(172)](n(242),{code:e,reason:t}),this.loadedTimes=0,this[n(499)].onError({code:e,reason:t})},n=(e,t)=>{const n=a0_0x20d2;_middleware.MetaMsg[n(172)](n(557),{code:e,reason:t}),this[n(440)]=0,this[n(499)][n(607)]({code:e,reason:t})};return{onmessage:e,onerror:t,onclose:n}}["onLoad"](){0===this.loadedTimes&&setTimeout(()=>{const e=a0_0x20d2;this.actions[e(413)](window[e(387)]),this[e(438)]=!0},1500),this[a0_0x277a85(440)]+=1}[a0_0x277a85(316)](e){const t=a0_0x277a85;this[t(499)][t(316)](e),this[t(413)]()}["onDataChannelMessage"]([e,t]){e===qe[a0_0x277a85(547)]}[a0_0x277a85(403)](e){const t=a0_0x277a85;this[t(499)][t(504)](e)}}class it extends at{constructor(...e){super(...e),this[a0_0x277a85(619)]={emitUIInteraction:O}}[a0_0x277a85(394)](e){this.actions=e,this[a0_0x277a85(284)].set()}get[a0_0x277a85(284)](){return{set:()=>{w("handle_responses",e=>{const t=a0_0x20d2;this[t(231)](e)})},remove:()=>{const e=a0_0x20d2;try{S(e(309))}catch(e){}}}}get["socketUrl"](){const e=a0_0x277a85,t=window.PixelStreamingConfig,n=_url.default.parse(t[e(514)]),o=_url.default[e(230)]({protocol:n.protocol===e(595)?"wss://":"ws://",host:n[e(514)],port:80==t.port?void 0:t[e(488)]})[e(166)](e(391),"://");return _middleware.MetaMsg[e(357)](e(594),o),o}["exit"](){const e=a0_0x277a85,t=this[e(151)];this[e(151)]=!1,pe?.["close"](),Ce=!1,this[e(284)][e(615)](),this[e(438)]=!1,this[e(151)]=t}["start"]({host:e,port:t=80,pixelStreaming:{warnTimeout:n=120,closeTimeout:o=10,lockMouse:a=!1,fakeMouseWithTouches:i=!1}}={}){const s=a0_0x277a85;this[s(438)]&&this[s(419)](),e&&(window[s(387)]={host:e,port:t},_middleware.MetaMsg[s(441)](s(324),window[s(387)])),this.autoStart=!0,_e={..._e,active:!0,warnTimeout:n,closeTimeout:o},Xe[s(193)]=a?0:1,Xe[s(378)]=i,Te=this[s(151)],ge(),this[s(499)].onConnect()}}APP=new it,window.__ps__=APP}function a0_0x2582(){const e=["addEventListener","Click to start","-PixelStreamingDisableLatencyTester=true, requesting latency report from the the browser to UE is disabled.","childNodes","onerror","UECaptureToSendMs","setUint16","onWebRtcCandidate","pointerEvents","statsContainer","25496141oRjHSQ","position","Control","onmousedown","BrowserReceiptTimeMs","webrtc-max-bitrate-text","onNewVideoTrack","textDisplayState","change","buffer","RightAlt","player","received first chunk of freeze frame: ","overlay","currentState","match-viewport-res-tgl","overlay-shown","AuxiliaryButton","removeChild","framesDecoded","%c[Outbound SS message (answer)]","documentElement","fromCharCode","Resizing too often - skipping","%c[Inbound SS (offer)]","15ydrBuP","ontouchstart","maxLength","candidate","warnTimeout","top: 0px; left: 0px; width: ","MaxBitrate","repeat","frameHeight","(Disabled by -AllowPixelStreamingCommands=false)","getElementById","callbacks","currentRoundTripTime","setInt16","onchange","readyState","extension","KeyDown","detail","webkitgamepadconnected","hasOwnProperty","Your browser doesn't support WebSocket","mozRequestPointerLock","px; left: ","stringify","Alt","encoder-min-qp-text","none","true","WebSocket","Pointer locked","countdownTimer","wheelDelta","<div>Total latency (ms): ","12fHEVON","stats","handle_responses","background: lightgreen; color: black","style","func","receiveAnswer","setUint8","useMic","onAggregatedStats","warning","PrimaryButton","MaxQP","reduce","getInt32","webkitgamepaddisconnected","@@@event","config","videoWidth","FrameDisplayDeltaTimeMs","ontouchend","webkitRequestAnimationFrame","MainButton","initKeyboardEvent",", dX: ","suppressBrowserKeys","FileMimeType","axes","videoPlayOverlay","receiving","toString","onkeyup","hiddenInput","receiveOffer","getTime","iceCandidate","top: ","4203muUfsx","toggle","onmessage","gamepaddisconnected","identifier","BackSpace","offsetY","): ","orange","ceil","movementY","Received complete file","send","log","Shift","KeyboardEvent","freezeframeBackground","abs","touch start","onUserCount","overlayButton","contains","UEReceiptTimeMs","command","innerText","active","prevState","MozWebSocket","Command","code","type","Disabled by -PixelStreamingDisableLatencyTester=true","enabled","LatencyTest","fakeMouseWithTouches","edit text","releaseMouseButtons","naturalWidth","%c[Inbound SS (answer)]","Got latency timings from UE.","packetsLost","<div>Total browser latency (ms): ","mouse_down","PixelStreamingConfig","click","<div style=\"color: ","PixelStreaming.WebRTC.MaxBitrate ","://:","socketUrl","exitPointerLock","init","1340OqCTdI","<center>No activity detected<br>Disconnecting in "," seconds<br>Click to continue<br></center>","RequestInitialSettings","display","length","%c[Inbound SS (config)]","editTextButton","setVideoQuality","charCodeAt","size","gamepad","mimetype","clientY"," at (","setAttribute","Can't calculate"," - ","onLoad","-AllowPixelStreamingCommands=false, sending console commands from browser to UE is disabled, including toggling FPS and changing encoder settings from the browser.","LatencyStats","Received file chunk: ","webrtc-min-bitrate-text","frameWidth","exit","<div>Frames Decoded: ","px; width: ","mouse leave","Average transfer bitrate: ","1970668sTGKpI","/images/Play.png","<div>Framerate: ","data","ws.onmessage","createOffer","onkeydown","show-stats-tgl","createObjectURL","changedTouches","hiddenState","classList","mouse wheel with delta ","touch end","initialised","onload","loadedTimes","warn","exhausted touch indentifiers","WebRTC data channel connected... waiting for video","removeEventListener","naturalHeight","FreezeFrame","<div>Frames dropped: ","Encoder","PixelStreaming.Encoder.MaxQP ","onmousemove","http://","checked","mousemove","lastChild","block","navigator","RightShift","4dYetah","WS closed: ","VideoEncoderAvgQP","timestamp","webkitGetGamepads","clientHeight","floor","pressed","mouse button ","oncontextmenu","events","webRTCSettingsHeader","px; cursor: ","FPS","resize","close","qualityStatus","button","received bigger freeze frame than advertised: ","%c[Outbound SS message (offer)]","WS error: ","offsetTop","div","latencyTestTimings","<div>UE probe duration (ms): ","inRange","requestAnimationFrame","default","SetUETimings","orientationchange","port","DOMMouseScroll","onmouseleave","Received first chunk of file","TouchEnd","href","getGamepads","x: ","UETransmissionTimeMs","2232066PhKSuz","countdown","actions","clientWidth","movementX","GamepadEvent","1106556LzHlvk","onQuality","DisableLatencyTest","height","freezeFrameOverlay","Response","grab","registerHoveringMouseEvents","AltRight","clientX","WebKitGamepadEvent","host","index","warning-elem-webrtc","pressMouseButtons","innerHeight","ForceTURN","<div>Packets Lost: ","getElementsByTagName","autoplay"," connected","<- SS: ","pointerLockElement","opacity: ","lime","download","innerWidth"," disconnected","encoder-params-submit","encoder-max-qp-text","touches","webrtc-fps-text","received complete freeze frame ","preventDefault","preferSFU","showOnScreenKeyboard","VIDEO","GamepadButtonPressed","onWebRtcAnswer","keyCode","listener","KeyPress","test-latency-button","receiveToCompositeMs","QualityControlOwnership","setVideoEnabled","<div>Net RTT (ms): ","<div>Browser receive to composite (ms): ","timestampStart","set","width","force-turn-tgl","bytesReceived","currentTarget","onclose","onclick","\">Blocky encoding quality</div>","search","GamepadButtonReleased","setres ","valid","onMouseMove","subtitle-text","TouchStart"," seconds","createElement","Not connected","left","NumberFormat","slice","<div>UE Send to capture (ms): ","onmouseup","6VfOKhC","innerHTML","bitrate","body","disabled","force","Received quality controller message, will control quality: ","offsetHeight","appendChild","TestStartTimeMs","playsinline","Disconnected: ","mouse enter","Creating offer","Setup Normalize and Quantize for playerAspectRatio > videoAspectRatio","TouchMove","MouseDown","playerCount"," down at (","Connection to:","https:","absolute","string","onVideoInitialised","pathname","px; height: ","target","initKeyEvent","PixelStreaming.WebRTC.MinBitrate ",", repeat = ","enlarge-display-to-fill-window-tgl","srcObject","onClose","createEvent","GamepadAnalog","731504csDLAm","</div>","video","src","UIInteraction","remove","mozRequestAnimationFrame","has","input","generic","pop","offsetLeft","SecondaryButton","RightControl","charCode","jpeg","onConfig","videoHeight","messageOverlay","autoStart","UnfreezeFrame","key down ","FifthButton","<div>Browser composite latency (ms): ","ShiftRight","InitialSettings","onScreenKeyboard"," up at (","<div>UE Encode (ms): ","framesDropped","N/A","toFixed","WebRTC","cursor","replace","invalid SS message type: ","onDataChannelConnected","undefined","webrtc-params-submit","reason","error","onkeypress","unrecognized data received, packet ID ","LockedMouse","show-fps-button","PixelStreaming.Encoder.MinQP ","decode","ontouchmove","668051zenFHA","warnTimer","<div>Video Resolution: ","gamepadconnected","background: lightblue; color: black","Gamepad disconnect handler","ws://","mozExitPointerLock","clickableState","Starting connection to server, please wait","push","value","onmousewheel","controlScheme","img","offsetWidth","framerate","round","gamepad: ","Chrome only","-> SS: stats\n","language","use-mic-tgl","<div>Duration: ","blur","Browser does not support autoplaying video without interaction - to resolve this we are going to show the play button overlay.","encoderSettingsHeader","warning-elem-encoder","utf-16","Could not player video stream because webRtcPlayerObj.video was not valid.","focus","fixed-size","key up ","offsetX","play","webRtcPlayerObj.onVideoInitialised","FourthButton","PixelStreaming","onmouseenter","top","start","mouseDown","buttons","usersCount","getBoundingClientRect","zIndex","add","requestPointerLock","<div>Received (","handleCandidateFromServer","format","callbacksHandler","onWebRtcOffer","location","answer","\">Video Quantization Parameter: ","PixelStreaming.WebRTC.Fps ","parse"];return a0_0x2582=function(){return e},a0_0x2582()}var _default=APP;exports.default=_default;