1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="773ed3fc-bebd-41f1-90b4-4d426da54c42",e._sentryDebugIdIdentifier="sentry-dbid-773ed3fc-bebd-41f1-90b4-4d426da54c42")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6238],{66238:(e,n,r)=>{r.r(n),r.d(n,{createBrowserScreenPublisher:()=>c});var o=r(93094);function c(e,n){let r;try{r=new URL(e.endpoint)}catch(e){throw Error("Recording connection is unavailable.")}if("livekit"!==e.providerId||"publisher"!==e.role||!["wss:","https:"].includes(r.protocol)||r.username||r.password||/[\s?#]/.test(e.endpoint))throw Error("Recording connection is unavailable.");(0,o.He)(o.$b.silent);let c=new o.Wv({adaptiveStream:!1,dynacast:!1,webAudioMix:!1}),i=!1,t=!1,a=0,s=()=>{a++,t=!1,i||n()};c.on(o.u9.Disconnected,s).on(o.u9.Reconnecting,s).on(o.u9.SignalReconnecting,s);let d=async(n,r)=>{var s;let d=null!=(s=e.channels)?s:{screen:!0,camera:!1,microphone:!1,systemAudio:!1},l=["screen","camera","microphone"].filter(e=>d[e]&&n[e]);if(i||!r()||0===l.length)throw Error("Recording connection expired.");let u=a,h=()=>!i&&u===a&&r(),p=e=>{let r=n[e];return"live"===r.readyState&&("microphone"===e?"audio"===r.kind:"video"===r.kind)&&("screen"!==e||"monitor"===r.getSettings().displaySurface)};if(!l.some(p))throw Error("Recording connection expired.");let f={screen:!1,camera:!1,microphone:!1,systemAudio:!1},w=c.connect(e.endpoint,e.token,{autoSubscribe:!1,maxRetries:1});w.then(()=>{i&&c.disconnect(!1).catch(()=>{})},()=>{}),await w;try{for(let e of l){if(!h())throw Error("Recording connection expired.");if(!p(e))continue;let r=n[e],i="microphone"===e?new o.J(r,void 0,!0):new o.M0(r,void 0,!0);try{if(await c.localParticipant.publishTrack(i,"microphone"===e?{source:o.CC.Source.Microphone,name:"cheatproof-microphone"}:{source:"screen"===e?o.CC.Source.ScreenShare:o.CC.Source.Camera,name:"screen"===e?"cheatproof-screen":"cheatproof-camera",simulcast:!1,videoCodec:"vp8",videoEncoding:{maxBitrate:"screen"===e?15e5:7e5,maxFramerate:"screen"===e?10:15}}),!h())throw Error("Recording connection expired.");p(e)?f[e]=!0:await c.localParticipant.unpublishTrack(i,!1)}catch(e){if(!h())throw e;await c.localParticipant.unpublishTrack(i,!1)}}if(!h()||!l.some(e=>f[e]))throw Error("Recording connection expired.");return t=!0,f}catch(e){throw t=!1,await c.disconnect(!1),e}};return{isConnected:()=>t&&!i,connect:async(e,n)=>{await d({screen:e,camera:null,microphone:null},n)},connectChannels:d,async close(){i=!0,t=!1,await c.disconnect(!1).catch(()=>{})}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.