@urun-sh/core 0.6.15 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/index.js +7 -7
- package/dist/adapter/index.mjs +1 -1
- package/dist/{app-KDA4G3HP.mjs → app-BPK6USP4.mjs} +1 -1
- package/dist/{chunk-F2X3TCVZ.mjs → chunk-ABECL5VR.mjs} +2 -2
- package/dist/chunk-AYK4QL42.mjs +30 -0
- package/dist/{chunk-6NLEURUP.mjs → chunk-ZPXAXTXU.mjs} +5 -5
- package/dist/index.browser.d.mts +7 -3
- package/dist/index.browser.d.ts +7 -3
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +7 -7
- package/dist/index.mjs +1 -1
- package/dist/internal.browser.d.mts +1 -1
- package/dist/internal.browser.d.ts +1 -1
- package/dist/internal.browser.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-BHDuPKhI.d.mts → stream-data-Ds1Nj4Xb.d.mts} +3 -1
- package/dist/{stream-data-BHDuPKhI.d.ts → stream-data-Ds1Nj4Xb.d.ts} +3 -1
- package/dist/{stream-data-gthI5aJp.d.mts → stream-data-f_tTf2uF.d.mts} +3 -1
- package/dist/{stream-data-gthI5aJp.d.ts → stream-data-f_tTf2uF.d.ts} +3 -1
- package/package.json +1 -1
- package/dist/chunk-QSW6SVK7.mjs +0 -30
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __urunCreateRequire } from 'node:module'; const require = globalThis.require ?? __urunCreateRequire(import.meta.url);
|
|
2
|
-
import{$ as Tt,A as Ze,B as Qe,C as et,D as tt,E as rt,F as nt,G as it,H as ot,I as st,J as at,K as ct,L as dt,M as ut,N as lt,O as pt,P as mt,Q as gt,R as ft,S as ht,T as St,U as yt,V as bt,W as Et,X as vt,Y as wt,Z as kt,_ as _t,a as pe,aa as Rt,b as me,ba as xt,c as ge,ca as Ct,d as fe,da as At,e as he,ea as Pt,f as Se,fa as It,g as ye,h as be,i as xe,j as Ce,k as Ae,l as Pe,m as Ie,n as Me,o as Oe,p as De,q as Le,r as Ue,s as Ne,t as Fe,u as Be,v as We,w as Ge,x as je,y as Xe,z as Je}from"./chunk-QSW6SVK7.mjs";import{$ as Ke,C as Ee,D as ve,E as we,F as ke,G as _e,H as O,J as Te,R as Re,U as $e,V as qe,W as Ve,_ as ze,a as M,aa as He,ba as Ye,c as q,d as V,e as z,f as K,g as H,h as Y,i as X,j as J,k as Z,l as Q,m as ee,n as te,o as re,p as ne,q as ie,r as oe,s as se,t as ae,u as ce,v as de,w as ue,x as le}from"./chunk-6NLEURUP.mjs";import"./chunk-NLAOQUYQ.mjs";var D="https://api.urun.sh",L="URUN_DEV";function Mt(){if(typeof process>"u")return!1;let i=process.env?.[L];if(typeof i!="string")return!1;let e=i.trim().toLowerCase();return e==="1"||e==="true"}var S=class extends Error{status;constructor(e,r){super(e),this.name="ClientTokenError",this.status=r}};async function Ot(i,e={}){if(!i)throw new S("[urun] createClientToken requires an org API key");let r=e.fetch??globalThis.fetch,o=O(e.baseUrl??D),t={};e.expiresIn!==void 0&&(t.expires_in=e.expiresIn),e.allowedFunctions!==void 0&&(t.allowed_functions=e.allowedFunctions),e.allowedOrigins!==void 0&&(t.allowed_origins=e.allowedOrigins),e.maxSessionS!==void 0&&(t.max_session_s=e.maxSessionS),e.subject!==void 0&&(t.subject=e.subject),e.metadata!==void 0&&(t.metadata=e.metadata),e.sharedApp&&(t.shared_app=!0),(e.dev??Mt())&&(t.dev=!0);let s;try{s=await r(`${o}/api/client-tokens`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(t)})}catch(p){throw new S(`[urun] client token mint request failed: ${p instanceof Error?p.message:String(p)}`)}let n={};try{n=await s.json()}catch{}if(!s.ok){let p=typeof n.message=="string"?n.message:`HTTP ${s.status}`;throw new S(`[urun] client token mint failed: ${p}`,s.status)}let c=typeof n.token=="string"?n.token:"",a=typeof n.org_id=="string"?n.org_id:"",l=typeof n.expires_at=="string"?Date.parse(n.expires_at):Number.NaN,d=typeof n.expires_in=="number"?n.expires_in:void 0;if(!c)throw new S("[urun] client token mint returned no token (control-plane contract violation)",s.status);let f=Number.isFinite(l)?new Date(l):new Date(Date.now()+(d??60)*1e3);return{token:c,expiresAt:f,orgId:a}}var U=3e4,N="stream:",x=class{_ws;_multiplexer;_pendingRpc=new Map;_rpcId=0;constructor(e,r){this._ws=e,this._multiplexer=r,this._ws.addEventListener("message",o=>{let t;try{t=JSON.parse(typeof o.data=="string"?o.data:"")}catch{return}if(t.rpcId&&this._pendingRpc.has(t.rpcId)){let s=this._pendingRpc.get(t.rpcId);this._pendingRpc.delete(t.rpcId),clearTimeout(s.timer),t.error?s.reject(new Error(t.error)):s.resolve(t.result)}})}async get(e){return this._sendRpc("store.get",{key:e})}async has(e){return await this._sendRpc("store.has",{key:e})}on(e,r){let o=`${N}${e}`;return this._multiplexer.on(o,t=>{r(t)})}emit(e,r){let o=`${N}${e}`,t=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{data:r};this._multiplexer.emit(o,t)}_getInternals(){return{multiplexer:this._multiplexer,ws:this._ws}}_sendRpc(e,r){return new Promise((o,t)=>{if(!this._ws||this._ws.readyState!==WebSocket.OPEN){t(new Error("WebSocket not open"));return}let s=String(++this._rpcId),n=setTimeout(()=>{this._pendingRpc.has(s)&&(this._pendingRpc.delete(s),t(new Error(`RPC request "${e}" timed out after ${U}ms`)))},U);this._pendingRpc.set(s,{resolve:o,reject:t,timer:n}),this._ws.send(JSON.stringify({rpcId:s,type:e,...r}))})}};function Dt(i){let o=`${i.baseUrl.replace(/\/$/,"").replace(/^http/,"ws")}/store/${encodeURIComponent(i.orgId)}`,t=new WebSocket(o);(i.jwt||i.apiKey)&&t.addEventListener("open",()=>{t.send(JSON.stringify({type:"auth",orgId:i.orgId,jwt:i.jwt,authProvider:i.authProvider,apiKey:i.apiKey}))});let s=new M(t);return new x(t,s)}var Lt='video/mp4; codecs="avc1.42E01E"';function Ut(i,e){let r=e?.codec??Lt,o=document.createElement("video");o.muted=!0,o.playsInline=!0;let t=new MediaSource,s=URL.createObjectURL(t);o.src=s,t.addEventListener("sourceopen",()=>{let p;try{p=t.addSourceBuffer(r)}catch(h){throw h instanceof DOMException&&h.name==="NotSupportedError"?new Error(`Codec not supported: "${r}". Ensure the codec string matches the fMP4 container format. Common values: video/mp4; codecs="avc1.42E01E" (H.264 Baseline), video/mp4; codecs="avc1.4D401F" (H.264 Main).`):h}let m=i.getReader();function u(){return p.updating?new Promise(h=>{p.addEventListener("updateend",()=>h(),{once:!0})}):Promise.resolve()}async function g(){try{for(;;){let{done:h,value:E}=await m.read();if(h){await u(),t.readyState==="open"&&t.endOfStream();return}await u();try{p.appendBuffer(E)}catch(w){if(w instanceof DOMException&&w.name==="QuotaExceededError"){let R=p.buffered;if(R.length>0){let $=R.start(R.length-1);p.remove(0,$),await u(),p.appendBuffer(E)}else throw w}else throw w}}}catch{if(t.readyState==="open")try{t.endOfStream("decode")}catch{}}}g()}),o.play().catch(()=>{});let n=o,c=n.captureStream??n.mozCaptureStream;if(!c)throw new Error("captureStream() is not supported in this browser. videoStream() requires HTMLMediaElement.captureStream() support.");let a=c.call(o),l=a.getTracks(),d=0,f=l.length;if(f===0)o.addEventListener("emptied",()=>{URL.revokeObjectURL(s)},{once:!0});else for(let p of l)p.addEventListener("ended",()=>{d++,d>=f&&URL.revokeObjectURL(s)});return a}function Nt(i){return i.status.startsWith("pending_")}var y=class extends Error{status;code;constructor(e,r){super(e),this.name="CreditsError",this.status=r.status,this.code=r.code,r.cause!==void 0&&(this.cause=r.cause),Object.setPrototypeOf(this,new.target.prototype)}},v=class extends y{constructor(e="[urun] credits: unauthorized",r="unauthorized"){super(e,{status:401,code:r}),this.name="CreditsUnauthorizedError",Object.setPrototypeOf(this,new.target.prototype)}};function Ft(i,e,r){let o=r||e||`HTTP ${i}`;return i===401?new v(o,e??"unauthorized"):new y(o,{status:i,code:e??`http_${i}`})}var k=class{constructor(e){this._options=e;this._base=`${e.functionsUrl.replace(/\/+$/,"")}/credits`}_options;_base;async getBalance(){let e=await this._request("GET","/balance");if(!e||typeof e!="object"||typeof e.org_id!="string")throw new y("[urun] credits: balance response missing org_id",{status:0,code:"bad_response"});return e}async getLedger(e={}){let o=(await this._request("GET","/ledger",{params:e.limit!==void 0?{limit:String(e.limit)}:void 0})).entries;return Array.isArray(o)?o:[]}async _request(e,r,o={}){let t=this._buildUrl(r,o.params),s=await this._resolveToken(),n=await this._fetch(t,e,s);if(n.status===401&&this._options.getAccessToken){let c=await this._options.getAccessToken({forceRefresh:!0,reason:"unauthorized"});c&&c!==s&&(s=c,n=await this._fetch(t,e,s))}if(!n.ok){let{code:c,message:a}=await this._readError(n);throw Ft(n.status,c,a)}return this._readJson(n)}_buildUrl(e,r){let o=`${this._base}${e}`,t=Object.entries(r??{}).filter(([,s])=>s!=null&&s!=="").map(([s,n])=>`${encodeURIComponent(s)}=${encodeURIComponent(n)}`).join("&");return t&&(o+=`?${t}`),o}_fetch(e,r,o){let t={Authorization:`Bearer ${o}`,apikey:o,Accept:"application/json","X-Tenant-Id":this._options.orgId};return this._options.authProvider&&(t["X-Auth-Provider"]=this._options.authProvider),fetch(e,{method:r,headers:t})}async _resolveToken(){if(this._options.getAccessToken){let r=await this._options.getAccessToken();if(r)return r}let e=this._options.jwt??this._options.apiKey;if(!e)throw new v("[urun] credits: no credential \u2014 provide one of apiKey, jwt, or getAccessToken");return e}async _readJson(e){try{return await e.json()}catch{return{}}}async _readError(e){try{let o=(await e.json()).error;if(o&&typeof o=="object"){let{code:t,message:s}=o;return{code:typeof t=="string"?t:void 0,message:typeof s=="string"?s:`HTTP ${e.status}`}}}catch{}return{message:`HTTP ${e.status}`}}};function Bt(i){return new k(i)}var _=class extends Error{constructor(){super("no getUserMedia in this environment \u2014 in headless/Node consumers, inject a media source via new CaptureController({ getUserMedia }) (e.g. a wrtc/werift capture)"),this.name="CaptureUnavailableError",Object.setPrototypeOf(this,new.target.prototype)}};function F(i){let e=[];return i.audio&&e.push("audio"),i.video&&e.push("video"),e.join("+")}function Wt(i,e){return e==="audio"?i.getAudioTracks():i.getVideoTracks()}function Gt(i,e){let r=i.getTracks();if(r.length===1&&r[0]===e)return i;try{return new MediaStream([e])}catch{return i}}function C(i,e){for(let r of[...i.lostListeners])try{r(e)}catch{}}var T=class{claims=new Map;injectedGetUserMedia;queue=Promise.resolve();constructor(e){this.injectedGetUserMedia=e?.getUserMedia}claim(e,r){return this.enqueue(async()=>{let o=this.claims.get(e);o&&(this.claims.delete(e),o.released=!0,o.track=null,o.stream=null,C(o,new Error(`${e} capture claim superseded by a newer claim`)));let t=this.createState(e,r);return this.claims.set(e,t),await this.converge(t),t.claim})}idle(){return this.queue.then(()=>{})}enqueue(e){let r=this.queue.then(e);return this.queue=r.then(()=>{},()=>{}),r}resolveGetUserMedia(){if(this.injectedGetUserMedia)return this.injectedGetUserMedia;let e=typeof navigator<"u"?navigator.mediaDevices:void 0;if(!e?.getUserMedia)throw new _;return r=>e.getUserMedia(r)}async converge(e){for(let n of this.claims.values())n.track&&(n.track.stop(),n.track=null,n.stream=null);if(this.claims.size===0)return;let r=this.resolveGetUserMedia(),o={audio:this.claims.get("audio")?.constraints??!1,video:this.claims.get("video")?.constraints??!1},t;try{t=await r(o)}catch(n){let c=`one-capture getUserMedia(${F(o)}) failed`,a=n instanceof Error?n.message:String(n);for(let l of[...this.claims.values()])if(this.claims.delete(l.kind),l.released=!0,l!==e){let d=new Error(`${c} \u2014 ${l.kind} capture lost: ${a||n}`);d.cause=n,C(l,d)}throw n}let s=[...this.claims.values()].sort((n,c)=>n===e?1:c===e?-1:0);for(let n of s){let c=Wt(t,n.kind)[0]??null;if(n.released){c?.stop();continue}if(!c){this.claims.delete(n.kind),n.released=!0;let a=Object.assign(new Error(`one-capture getUserMedia(${F(o)}) returned no ${n.kind} track`),{name:"NotFoundError"});if(n===e)throw a;C(n,a);continue}if(n.track=c,n.stream=Gt(t,c),n!==e)for(let a of[...n.trackListeners])try{a(c,n.stream)}catch{}}}createState(e,r){let o=this,t={kind:e,constraints:r,track:null,stream:null,released:!1,trackListeners:new Set,lostListeners:new Set,claim:{kind:e,get track(){return t.track},get stream(){return t.stream},update(s){return o.enqueue(async()=>{if(t.released)throw new Error(`${e} capture claim already released`);if(t.constraints=s,await o.converge(t),!t.track)throw new Error(`${e} capture update yielded no track`);return t.track})},release(){t.released||(t.released=!0,o.claims.get(e)===t&&o.claims.delete(e),t.track?.stop(),t.track=null,t.stream=null)},onTrack(s){return t.trackListeners.add(s),()=>t.trackListeners.delete(s)},onLost(s){return t.lostListeners.add(s),()=>t.lostListeners.delete(s)}}};return t}},jt=null;function $t(){return jt??=new T}var B="input",qt=30;function Vt(i){let e=i.now??Date.now,r=i.field??B,o=1e3/Math.max(i.hz??30,.001),t=new Set,s=0,n=0,c=0,a=0,l,d=null,f=!1,p=()=>{if(f)return;l=e(),a+=1;let u={keys:[...t],buttons:s,pointer:{x:n,y:c},seq:a,at:l};try{i.awareness.setLocalStateField(r,u)}catch{}},m=()=>{if(f)return;let u=e();if(l===void 0||u-l>=o){d&&(clearTimeout(d),d=null),p();return}if(d)return;let g=Math.max(o-(u-l),0);d=setTimeout(()=>{d=null,p()},g),d.unref?.()};return{keyDown(u){let g=String(u).toLowerCase();t.has(g)||(t.add(g),m())},keyUp(u){let g=String(u).toLowerCase();t.delete(g)&&m()},setButtons(u){let g=Number.isFinite(u)?Number(u):0;g!==s&&(s=g,m())},movePointer(u,g){let h=Number.isFinite(u)?Number(u):0,E=Number.isFinite(g)?Number(g):0;h===0&&E===0||(n+=h,c+=E,m())},heldKeys(){return[...t]},clear(){f||(t.clear(),s=0,d&&(clearTimeout(d),d=null),p())},dispose(){if(f)return;let u=t.size>0||s!==0;t.clear(),s=0,d&&(clearTimeout(d),d=null),u&&p(),f=!0}}}var zt=1024,Kt=.92,Ht=262144,Yt=256e3,A=[.9,.8,.7,.6,.5],W=.8,Xt=8;function I(i,e,r){if(!(i>0)||!(e>0))throw new Error(`reference image has no pixels (${i}x${e})`);let o=Math.min(1,r/Math.max(i,e));return{width:Math.max(1,Math.round(i*o)),height:Math.max(1,Math.round(e*o))}}async function Jt(i){if(typeof createImageBitmap!="function")throw new Error("this browser cannot decode images for reference capture (createImageBitmap unavailable)");return await createImageBitmap(i,{imageOrientation:"from-image"})}async function j(i,e,r){let o=await new Promise(t=>{i.toBlob(t,e,e==="image/jpeg"?r:void 0)});if(!o)throw new Error(`could not encode the reference image as ${e}`);return o}function G(i,e){console.warn(`[urun] reference image over the 256000-byte data-channel message budget (media/Chrome maxMessageSize 262144 would drop it SILENTLY): ${i} -> ${e} bytes`)}async function P(i,e,r,o,t){let s=document.createElement("canvas");s.width=e,s.height=r;let n=s.getContext("2d");if(!n)throw new Error("could not prepare the reference image (no 2d canvas context)");return o==="image/jpeg"&&(n.fillStyle="#fff",n.fillRect(0,0,e,r)),n.drawImage(i,0,0,e,r),await j(s,o,t)}async function Zt(i,e,r,o){let{width:t,height:s}=e,n=await P(i,t,s,r,o);if(n.size<=256e3)return{blob:n,width:t,height:s};if(r==="image/jpeg"){for(let a of A)if(!(a>=o)&&(n=await P(i,t,s,r,a),n.size<=256e3))return G(`quality ${o} -> ${a}`,n.size),{blob:n,width:t,height:s}}let c=r==="image/jpeg"?A[A.length-1]:o;for(let a=0;a<Xt;a++)if(t=Math.max(16,Math.round(t*W)),s=Math.max(16,Math.round(s*W)),n=await P(i,t,s,r,c),n.size<=256e3)return G(`downscaled to ${t}x${s} @ q${c}`,n.size),{blob:n,width:t,height:s};throw new Error(`this image cannot be sent: even at ${t}x${s} it is over the 256000-byte limit for one message. Try a smaller or less detailed picture.`)}async function Qt(i,e){let{maxSize:r=1024,type:o="image/jpeg",quality:t=.92,source:s}=e,n=await Jt(i);try{let c=I(n.width,n.height,r),a=await Zt(n,c,o,t);return{bytes:new Uint8Array(await a.blob.arrayBuffer()),type:o,width:a.width,height:a.height,source:s}}finally{n.close()}}function er(i){let e=i instanceof Error?i.name:"",r=i instanceof Error?i.message:String(i);switch(e){case"NotAllowedError":case"SecurityError":return"Camera access is turned off for this site. Allow the camera in your browser settings, then try again.";case"NotFoundError":case"OverconstrainedError":return"No camera was found on this device. You can upload a photo instead.";case"NotReadableError":case"AbortError":return"The camera is being used by another app. Close it, then try again.";default:break}return/has not shown a frame/i.test(r)?"The camera is still starting. Wait for the picture to appear, then take the photo.":/secure|https/i.test(r)?"The camera only works over a secure (https) connection.":/decode|not settled|createImageBitmap|encode|image/i.test(r)?"That file couldn't be read as an image. Try a JPEG or PNG photo.":"The camera couldn't be started. Check that no other app is using it, then try again."}function tr(){return typeof navigator>"u"||typeof window>"u"||!window.isSecureContext?!1:typeof navigator.mediaDevices?.getUserMedia=="function"}async function rr(i,e){let r=i.videoWidth,o=i.videoHeight;if(!(r>0)||!(o>0))throw new Error("the camera has not shown a frame yet");let{maxSize:t=1024,type:s="image/jpeg",quality:n=.92}=e??{},c=I(r,o,t),a=document.createElement("canvas");a.width=c.width,a.height=c.height;let l=a.getContext("2d");if(!l)throw new Error("could not prepare the reference image (no 2d canvas context)");s==="image/jpeg"&&(l.fillStyle="#fff",l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height);let d=await j(a,s,n);return{bytes:new Uint8Array(await d.arrayBuffer()),type:s,width:c.width,height:c.height,source:"camera"}}var nr=new Set(["w","a","s","d"]),b=(i,e)=>Math.min(e,Math.max(-e,i));function ir(i={}){let{panPerPixel:e=9e-4,zoomPerSecond:r=.35,strafePerSecond:o=.18,decayTauMs:t=900,frameRelax:s=.06,maxPan:n=.12,maxLogZoom:c=.22}=i,a=0,l=0,d=0,f=null,p=new Set;return{pointerDelta(m,u){a=b(a-m*e,n),l=b(l-u*e,n)},keyDown(m){let u=m.toLowerCase();nr.has(u)&&p.add(u)},keyUp(m){p.delete(m.toLowerCase())},clearKeys(){p.clear()},frameArrived(){let m=1-s;a*=m,l*=m,d*=m},tick(m){if(f===null){f=m;return}let u=Math.max(0,Math.min(100,m-f))/1e3;f=m,p.has("w")&&(d=b(d+r*u,c)),p.has("s")&&(d=b(d-r*u,c)),p.has("a")&&(a=b(a+o*u,n)),p.has("d")&&(a=b(a-o*u,n));let g=Math.exp(-u*1e3/t);a*=g,l*=g,d*=g},transform(){return{translateX:a,translateY:l,scale:Math.exp(d)}},isIdentity(m=5e-4){return Math.abs(a)<m&&Math.abs(l)<m&&Math.abs(d)<m},reset(){a=0,l=0,d=0,p.clear()}}}export{me as ACTIVATION_COLD_BOOT_AFTER_MS,ge as ACTIVATION_DEGRADED_AFTER_MS,he as ACTIVATION_HINT_PATH,pe as ACTIVATION_STILL_AFTER_MS,rt as ACTIVITY_DOM_EVENTS,Qe as ACTIVITY_FIELD,tt as ACTIVITY_STAMP_MIN_INTERVAL_MS,be as ActivationMonitor,It as App,Ee as BACKOFF_BASE_MS,we as BACKOFF_MAX_ATTEMPTS,ve as BACKOFF_MAX_MS,de as COLD_BOOT_WHEN_LIVE_TIMEOUT_MS,T as CaptureController,_ as CaptureUnavailableError,S as ClientTokenError,k as CreditsClient,y as CreditsError,v as CreditsUnauthorizedError,Ht as DATA_CHANNEL_MESSAGE_CEILING,xt as DEFAULT_DOC_SYNC_TIMEOUT_MS,D as DEFAULT_GATEWAY_URL,J as DEFAULT_PRODUCE_ACK_TIMEOUT_MS,Kt as DEFAULT_REFERENCE_JPEG_QUALITY,zt as DEFAULT_REFERENCE_MAX_SIZE,ce as DEFAULT_WHEN_LIVE_TIMEOUT_MS,ze as DERIVED_LEG_SEP,ht as DGRAM_HEADER_BYTES,ot as FOCUS_FIELD,ct as FOREGROUND_COALESCE_MS,bt as FrameReassembler,Xe as GENERATION_TICK_EMIT_INTERVAL_MS,Je as GENERATION_TICK_MAX_EXTRAPOLATION_MS,qt as INPUT_PRESENCE_DEFAULT_HZ,B as INPUT_PRESENCE_FIELD,Fe as InvalidDurationError,Se as LEGACY_ACTIVATION_HINT_PATH,fe as PLATFORM_DOC_NAME,Ne as PermanentLockedError,Ue as PinRequiresActiveTempError,at as PresenceTracker,Z as ProduceAckTimeoutError,De as RecordingNotFoundError,Ge as RecordingsClient,Me as RecordingsError,Oe as RecordingsUnauthorizedError,Q as RequestAbortError,ee as RequestCancelledError,Y as RequestDocSyncError,K as RequestError,H as RequestTimeoutError,Le as RetainNotTempError,Ae as RuntimeArtifactNotFoundError,Ie as RuntimeArtifactsClient,xe as RuntimeArtifactsError,Ce as RuntimeArtifactsUnauthorizedError,Ye as SIGNALING_PROTOCOL_VERSION,$e as STREAM_END,Ct as Session,oe as SessionAllocationError,At as SessionDirectory,z as SessionDirectoryError,V as SessionEndError,q as SessionEndUnavailableError,re as SessionFailedError,X as StreamDirectionConflict,_t as TransportNegotiator,ie as TransportSessionMismatchError,Tt as TransportSessionSignaling,L as URUN_DEV_ENV,it as USER_ACTIVITY_FIELD,st as USER_ACTIVITY_MIN_INTERVAL_MS,et as VISIBILITY_FIELD,Yt as WIRE_MESSAGE_BUDGET,mt as WT_CONTROL_FRAME_MAX,Et as WT_DATA_STREAM_VERSION,Rt as WebRtcSession,kt as WebTransportSession,ft as WtControlDecoder,vt as WtDataStreamParser,ye as activationHintFrom,tr as cameraCaptureAvailable,rr as captureStillFromVideo,ke as computeBackoffDelay,wt as consumeWtDataStreams,nt as createActivityTracker,ir as createCameraWarp,Ot as createClientToken,Bt as createCreditsClient,Vt as createInputPresencePublisher,je as createRecordingsClient,Pe as createRuntimeArtifactsClient,Dt as createStore,Ve as decodeStreamEnvelope,He as derivedLegName,Ke as derivedLegRole,te as describeSessionFailure,le as describeSessionPhase,qe as encodeStreamEnvelope,gt as encodeWtControlFrame,I as fitWithin,Be as isDurationString,ae as isPausedPhase,Nt as isPendingRecording,_e as isRetryableSessionError,se as isWakingPhase,pt as mediaRecorderChunkSource,Qt as normalizeReferenceImage,We as normalizeRetention,lt as observeLeaveConfirm,dt as observePageLifecycle,ut as observePageTeardown,St as parseDgramHeader,Re as prewake,er as referenceImageErrorMessage,Te as releaseSessionBeacon,Pt as sessionDirectory,ne as sessionFailureFromMediaError,$t as sharedCaptureController,Ut as videoStream,Ze as watchGenerationTick,ue as whenLive,yt as writeDgramHeader};
|
|
2
|
+
import{$ as Tt,A as Ze,B as Qe,C as et,D as tt,E as rt,F as nt,G as it,H as ot,I as st,J as at,K as ct,L as dt,M as ut,N as lt,O as pt,P as mt,Q as gt,R as ft,S as ht,T as St,U as yt,V as bt,W as Et,X as vt,Y as wt,Z as kt,_ as _t,a as pe,aa as Rt,b as me,ba as xt,c as ge,ca as Ct,d as fe,da as At,e as he,ea as Pt,f as Se,fa as It,g as ye,h as be,i as xe,j as Ce,k as Ae,l as Pe,m as Ie,n as Me,o as Oe,p as De,q as Le,r as Ue,s as Ne,t as Fe,u as Be,v as We,w as Ge,x as je,y as Xe,z as Je}from"./chunk-AYK4QL42.mjs";import{$ as ze,C as Ee,D as ve,E as we,F as ke,G as _e,H as O,J as Te,S as Re,V as $e,W as qe,X as Ve,a as M,aa as Ke,ba as He,c as q,ca as Ye,d as V,e as z,f as K,g as H,h as Y,i as X,j as J,k as Z,l as Q,m as ee,n as te,o as re,p as ne,q as ie,r as oe,s as se,t as ae,u as ce,v as de,w as ue,x as le}from"./chunk-ZPXAXTXU.mjs";import"./chunk-NLAOQUYQ.mjs";var D="https://api.urun.sh",L="URUN_DEV";function Mt(){if(typeof process>"u")return!1;let i=process.env?.[L];if(typeof i!="string")return!1;let e=i.trim().toLowerCase();return e==="1"||e==="true"}var S=class extends Error{status;constructor(e,r){super(e),this.name="ClientTokenError",this.status=r}};async function Ot(i,e={}){if(!i)throw new S("[urun] createClientToken requires an org API key");let r=e.fetch??globalThis.fetch,o=O(e.baseUrl??D),t={};e.expiresIn!==void 0&&(t.expires_in=e.expiresIn),e.allowedFunctions!==void 0&&(t.allowed_functions=e.allowedFunctions),e.allowedOrigins!==void 0&&(t.allowed_origins=e.allowedOrigins),e.maxSessionS!==void 0&&(t.max_session_s=e.maxSessionS),e.subject!==void 0&&(t.subject=e.subject),e.metadata!==void 0&&(t.metadata=e.metadata),e.sharedApp&&(t.shared_app=!0),(e.dev??Mt())&&(t.dev=!0);let s;try{s=await r(`${o}/api/client-tokens`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(t)})}catch(p){throw new S(`[urun] client token mint request failed: ${p instanceof Error?p.message:String(p)}`)}let n={};try{n=await s.json()}catch{}if(!s.ok){let p=typeof n.message=="string"?n.message:`HTTP ${s.status}`;throw new S(`[urun] client token mint failed: ${p}`,s.status)}let c=typeof n.token=="string"?n.token:"",a=typeof n.org_id=="string"?n.org_id:"",l=typeof n.expires_at=="string"?Date.parse(n.expires_at):Number.NaN,d=typeof n.expires_in=="number"?n.expires_in:void 0;if(!c)throw new S("[urun] client token mint returned no token (control-plane contract violation)",s.status);let f=Number.isFinite(l)?new Date(l):new Date(Date.now()+(d??60)*1e3);return{token:c,expiresAt:f,orgId:a}}var U=3e4,N="stream:",x=class{_ws;_multiplexer;_pendingRpc=new Map;_rpcId=0;constructor(e,r){this._ws=e,this._multiplexer=r,this._ws.addEventListener("message",o=>{let t;try{t=JSON.parse(typeof o.data=="string"?o.data:"")}catch{return}if(t.rpcId&&this._pendingRpc.has(t.rpcId)){let s=this._pendingRpc.get(t.rpcId);this._pendingRpc.delete(t.rpcId),clearTimeout(s.timer),t.error?s.reject(new Error(t.error)):s.resolve(t.result)}})}async get(e){return this._sendRpc("store.get",{key:e})}async has(e){return await this._sendRpc("store.has",{key:e})}on(e,r){let o=`${N}${e}`;return this._multiplexer.on(o,t=>{r(t)})}emit(e,r){let o=`${N}${e}`,t=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{data:r};this._multiplexer.emit(o,t)}_getInternals(){return{multiplexer:this._multiplexer,ws:this._ws}}_sendRpc(e,r){return new Promise((o,t)=>{if(!this._ws||this._ws.readyState!==WebSocket.OPEN){t(new Error("WebSocket not open"));return}let s=String(++this._rpcId),n=setTimeout(()=>{this._pendingRpc.has(s)&&(this._pendingRpc.delete(s),t(new Error(`RPC request "${e}" timed out after ${U}ms`)))},U);this._pendingRpc.set(s,{resolve:o,reject:t,timer:n}),this._ws.send(JSON.stringify({rpcId:s,type:e,...r}))})}};function Dt(i){let o=`${i.baseUrl.replace(/\/$/,"").replace(/^http/,"ws")}/store/${encodeURIComponent(i.orgId)}`,t=new WebSocket(o);(i.jwt||i.apiKey)&&t.addEventListener("open",()=>{t.send(JSON.stringify({type:"auth",orgId:i.orgId,jwt:i.jwt,authProvider:i.authProvider,apiKey:i.apiKey}))});let s=new M(t);return new x(t,s)}var Lt='video/mp4; codecs="avc1.42E01E"';function Ut(i,e){let r=e?.codec??Lt,o=document.createElement("video");o.muted=!0,o.playsInline=!0;let t=new MediaSource,s=URL.createObjectURL(t);o.src=s,t.addEventListener("sourceopen",()=>{let p;try{p=t.addSourceBuffer(r)}catch(h){throw h instanceof DOMException&&h.name==="NotSupportedError"?new Error(`Codec not supported: "${r}". Ensure the codec string matches the fMP4 container format. Common values: video/mp4; codecs="avc1.42E01E" (H.264 Baseline), video/mp4; codecs="avc1.4D401F" (H.264 Main).`):h}let m=i.getReader();function u(){return p.updating?new Promise(h=>{p.addEventListener("updateend",()=>h(),{once:!0})}):Promise.resolve()}async function g(){try{for(;;){let{done:h,value:E}=await m.read();if(h){await u(),t.readyState==="open"&&t.endOfStream();return}await u();try{p.appendBuffer(E)}catch(w){if(w instanceof DOMException&&w.name==="QuotaExceededError"){let R=p.buffered;if(R.length>0){let $=R.start(R.length-1);p.remove(0,$),await u(),p.appendBuffer(E)}else throw w}else throw w}}}catch{if(t.readyState==="open")try{t.endOfStream("decode")}catch{}}}g()}),o.play().catch(()=>{});let n=o,c=n.captureStream??n.mozCaptureStream;if(!c)throw new Error("captureStream() is not supported in this browser. videoStream() requires HTMLMediaElement.captureStream() support.");let a=c.call(o),l=a.getTracks(),d=0,f=l.length;if(f===0)o.addEventListener("emptied",()=>{URL.revokeObjectURL(s)},{once:!0});else for(let p of l)p.addEventListener("ended",()=>{d++,d>=f&&URL.revokeObjectURL(s)});return a}function Nt(i){return i.status.startsWith("pending_")}var y=class extends Error{status;code;constructor(e,r){super(e),this.name="CreditsError",this.status=r.status,this.code=r.code,r.cause!==void 0&&(this.cause=r.cause),Object.setPrototypeOf(this,new.target.prototype)}},v=class extends y{constructor(e="[urun] credits: unauthorized",r="unauthorized"){super(e,{status:401,code:r}),this.name="CreditsUnauthorizedError",Object.setPrototypeOf(this,new.target.prototype)}};function Ft(i,e,r){let o=r||e||`HTTP ${i}`;return i===401?new v(o,e??"unauthorized"):new y(o,{status:i,code:e??`http_${i}`})}var k=class{constructor(e){this._options=e;this._base=`${e.functionsUrl.replace(/\/+$/,"")}/credits`}_options;_base;async getBalance(){let e=await this._request("GET","/balance");if(!e||typeof e!="object"||typeof e.org_id!="string")throw new y("[urun] credits: balance response missing org_id",{status:0,code:"bad_response"});return e}async getLedger(e={}){let o=(await this._request("GET","/ledger",{params:e.limit!==void 0?{limit:String(e.limit)}:void 0})).entries;return Array.isArray(o)?o:[]}async _request(e,r,o={}){let t=this._buildUrl(r,o.params),s=await this._resolveToken(),n=await this._fetch(t,e,s);if(n.status===401&&this._options.getAccessToken){let c=await this._options.getAccessToken({forceRefresh:!0,reason:"unauthorized"});c&&c!==s&&(s=c,n=await this._fetch(t,e,s))}if(!n.ok){let{code:c,message:a}=await this._readError(n);throw Ft(n.status,c,a)}return this._readJson(n)}_buildUrl(e,r){let o=`${this._base}${e}`,t=Object.entries(r??{}).filter(([,s])=>s!=null&&s!=="").map(([s,n])=>`${encodeURIComponent(s)}=${encodeURIComponent(n)}`).join("&");return t&&(o+=`?${t}`),o}_fetch(e,r,o){let t={Authorization:`Bearer ${o}`,apikey:o,Accept:"application/json","X-Tenant-Id":this._options.orgId};return this._options.authProvider&&(t["X-Auth-Provider"]=this._options.authProvider),fetch(e,{method:r,headers:t})}async _resolveToken(){if(this._options.getAccessToken){let r=await this._options.getAccessToken();if(r)return r}let e=this._options.jwt??this._options.apiKey;if(!e)throw new v("[urun] credits: no credential \u2014 provide one of apiKey, jwt, or getAccessToken");return e}async _readJson(e){try{return await e.json()}catch{return{}}}async _readError(e){try{let o=(await e.json()).error;if(o&&typeof o=="object"){let{code:t,message:s}=o;return{code:typeof t=="string"?t:void 0,message:typeof s=="string"?s:`HTTP ${e.status}`}}}catch{}return{message:`HTTP ${e.status}`}}};function Bt(i){return new k(i)}var _=class extends Error{constructor(){super("no getUserMedia in this environment \u2014 in headless/Node consumers, inject a media source via new CaptureController({ getUserMedia }) (e.g. a wrtc/werift capture)"),this.name="CaptureUnavailableError",Object.setPrototypeOf(this,new.target.prototype)}};function F(i){let e=[];return i.audio&&e.push("audio"),i.video&&e.push("video"),e.join("+")}function Wt(i,e){return e==="audio"?i.getAudioTracks():i.getVideoTracks()}function Gt(i,e){let r=i.getTracks();if(r.length===1&&r[0]===e)return i;try{return new MediaStream([e])}catch{return i}}function C(i,e){for(let r of[...i.lostListeners])try{r(e)}catch{}}var T=class{claims=new Map;injectedGetUserMedia;queue=Promise.resolve();constructor(e){this.injectedGetUserMedia=e?.getUserMedia}claim(e,r){return this.enqueue(async()=>{let o=this.claims.get(e);o&&(this.claims.delete(e),o.released=!0,o.track=null,o.stream=null,C(o,new Error(`${e} capture claim superseded by a newer claim`)));let t=this.createState(e,r);return this.claims.set(e,t),await this.converge(t),t.claim})}idle(){return this.queue.then(()=>{})}enqueue(e){let r=this.queue.then(e);return this.queue=r.then(()=>{},()=>{}),r}resolveGetUserMedia(){if(this.injectedGetUserMedia)return this.injectedGetUserMedia;let e=typeof navigator<"u"?navigator.mediaDevices:void 0;if(!e?.getUserMedia)throw new _;return r=>e.getUserMedia(r)}async converge(e){for(let n of this.claims.values())n.track&&(n.track.stop(),n.track=null,n.stream=null);if(this.claims.size===0)return;let r=this.resolveGetUserMedia(),o={audio:this.claims.get("audio")?.constraints??!1,video:this.claims.get("video")?.constraints??!1},t;try{t=await r(o)}catch(n){let c=`one-capture getUserMedia(${F(o)}) failed`,a=n instanceof Error?n.message:String(n);for(let l of[...this.claims.values()])if(this.claims.delete(l.kind),l.released=!0,l!==e){let d=new Error(`${c} \u2014 ${l.kind} capture lost: ${a||n}`);d.cause=n,C(l,d)}throw n}let s=[...this.claims.values()].sort((n,c)=>n===e?1:c===e?-1:0);for(let n of s){let c=Wt(t,n.kind)[0]??null;if(n.released){c?.stop();continue}if(!c){this.claims.delete(n.kind),n.released=!0;let a=Object.assign(new Error(`one-capture getUserMedia(${F(o)}) returned no ${n.kind} track`),{name:"NotFoundError"});if(n===e)throw a;C(n,a);continue}if(n.track=c,n.stream=Gt(t,c),n!==e)for(let a of[...n.trackListeners])try{a(c,n.stream)}catch{}}}createState(e,r){let o=this,t={kind:e,constraints:r,track:null,stream:null,released:!1,trackListeners:new Set,lostListeners:new Set,claim:{kind:e,get track(){return t.track},get stream(){return t.stream},update(s){return o.enqueue(async()=>{if(t.released)throw new Error(`${e} capture claim already released`);if(t.constraints=s,await o.converge(t),!t.track)throw new Error(`${e} capture update yielded no track`);return t.track})},release(){t.released||(t.released=!0,o.claims.get(e)===t&&o.claims.delete(e),t.track?.stop(),t.track=null,t.stream=null)},onTrack(s){return t.trackListeners.add(s),()=>t.trackListeners.delete(s)},onLost(s){return t.lostListeners.add(s),()=>t.lostListeners.delete(s)}}};return t}},jt=null;function $t(){return jt??=new T}var B="input",qt=30;function Vt(i){let e=i.now??Date.now,r=i.field??B,o=1e3/Math.max(i.hz??30,.001),t=new Set,s=0,n=0,c=0,a=0,l,d=null,f=!1,p=()=>{if(f)return;l=e(),a+=1;let u={keys:[...t],buttons:s,pointer:{x:n,y:c},seq:a,at:l};try{i.awareness.setLocalStateField(r,u)}catch{}},m=()=>{if(f)return;let u=e();if(l===void 0||u-l>=o){d&&(clearTimeout(d),d=null),p();return}if(d)return;let g=Math.max(o-(u-l),0);d=setTimeout(()=>{d=null,p()},g),d.unref?.()};return{keyDown(u){let g=String(u).toLowerCase();t.has(g)||(t.add(g),m())},keyUp(u){let g=String(u).toLowerCase();t.delete(g)&&m()},setButtons(u){let g=Number.isFinite(u)?Number(u):0;g!==s&&(s=g,m())},movePointer(u,g){let h=Number.isFinite(u)?Number(u):0,E=Number.isFinite(g)?Number(g):0;h===0&&E===0||(n+=h,c+=E,m())},heldKeys(){return[...t]},clear(){f||(t.clear(),s=0,d&&(clearTimeout(d),d=null),p())},dispose(){if(f)return;let u=t.size>0||s!==0;t.clear(),s=0,d&&(clearTimeout(d),d=null),u&&p(),f=!0}}}var zt=1024,Kt=.92,Ht=262144,Yt=256e3,A=[.9,.8,.7,.6,.5],W=.8,Xt=8;function I(i,e,r){if(!(i>0)||!(e>0))throw new Error(`reference image has no pixels (${i}x${e})`);let o=Math.min(1,r/Math.max(i,e));return{width:Math.max(1,Math.round(i*o)),height:Math.max(1,Math.round(e*o))}}async function Jt(i){if(typeof createImageBitmap!="function")throw new Error("this browser cannot decode images for reference capture (createImageBitmap unavailable)");return await createImageBitmap(i,{imageOrientation:"from-image"})}async function j(i,e,r){let o=await new Promise(t=>{i.toBlob(t,e,e==="image/jpeg"?r:void 0)});if(!o)throw new Error(`could not encode the reference image as ${e}`);return o}function G(i,e){console.warn(`[urun] reference image over the 256000-byte data-channel message budget (media/Chrome maxMessageSize 262144 would drop it SILENTLY): ${i} -> ${e} bytes`)}async function P(i,e,r,o,t){let s=document.createElement("canvas");s.width=e,s.height=r;let n=s.getContext("2d");if(!n)throw new Error("could not prepare the reference image (no 2d canvas context)");return o==="image/jpeg"&&(n.fillStyle="#fff",n.fillRect(0,0,e,r)),n.drawImage(i,0,0,e,r),await j(s,o,t)}async function Zt(i,e,r,o){let{width:t,height:s}=e,n=await P(i,t,s,r,o);if(n.size<=256e3)return{blob:n,width:t,height:s};if(r==="image/jpeg"){for(let a of A)if(!(a>=o)&&(n=await P(i,t,s,r,a),n.size<=256e3))return G(`quality ${o} -> ${a}`,n.size),{blob:n,width:t,height:s}}let c=r==="image/jpeg"?A[A.length-1]:o;for(let a=0;a<Xt;a++)if(t=Math.max(16,Math.round(t*W)),s=Math.max(16,Math.round(s*W)),n=await P(i,t,s,r,c),n.size<=256e3)return G(`downscaled to ${t}x${s} @ q${c}`,n.size),{blob:n,width:t,height:s};throw new Error(`this image cannot be sent: even at ${t}x${s} it is over the 256000-byte limit for one message. Try a smaller or less detailed picture.`)}async function Qt(i,e){let{maxSize:r=1024,type:o="image/jpeg",quality:t=.92,source:s}=e,n=await Jt(i);try{let c=I(n.width,n.height,r),a=await Zt(n,c,o,t);return{bytes:new Uint8Array(await a.blob.arrayBuffer()),type:o,width:a.width,height:a.height,source:s}}finally{n.close()}}function er(i){let e=i instanceof Error?i.name:"",r=i instanceof Error?i.message:String(i);switch(e){case"NotAllowedError":case"SecurityError":return"Camera access is turned off for this site. Allow the camera in your browser settings, then try again.";case"NotFoundError":case"OverconstrainedError":return"No camera was found on this device. You can upload a photo instead.";case"NotReadableError":case"AbortError":return"The camera is being used by another app. Close it, then try again.";default:break}return/has not shown a frame/i.test(r)?"The camera is still starting. Wait for the picture to appear, then take the photo.":/secure|https/i.test(r)?"The camera only works over a secure (https) connection.":/decode|not settled|createImageBitmap|encode|image/i.test(r)?"That file couldn't be read as an image. Try a JPEG or PNG photo.":"The camera couldn't be started. Check that no other app is using it, then try again."}function tr(){return typeof navigator>"u"||typeof window>"u"||!window.isSecureContext?!1:typeof navigator.mediaDevices?.getUserMedia=="function"}async function rr(i,e){let r=i.videoWidth,o=i.videoHeight;if(!(r>0)||!(o>0))throw new Error("the camera has not shown a frame yet");let{maxSize:t=1024,type:s="image/jpeg",quality:n=.92}=e??{},c=I(r,o,t),a=document.createElement("canvas");a.width=c.width,a.height=c.height;let l=a.getContext("2d");if(!l)throw new Error("could not prepare the reference image (no 2d canvas context)");s==="image/jpeg"&&(l.fillStyle="#fff",l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height);let d=await j(a,s,n);return{bytes:new Uint8Array(await d.arrayBuffer()),type:s,width:c.width,height:c.height,source:"camera"}}var nr=new Set(["w","a","s","d"]),b=(i,e)=>Math.min(e,Math.max(-e,i));function ir(i={}){let{panPerPixel:e=9e-4,zoomPerSecond:r=.35,strafePerSecond:o=.18,decayTauMs:t=900,frameRelax:s=.06,maxPan:n=.12,maxLogZoom:c=.22}=i,a=0,l=0,d=0,f=null,p=new Set;return{pointerDelta(m,u){a=b(a-m*e,n),l=b(l-u*e,n)},keyDown(m){let u=m.toLowerCase();nr.has(u)&&p.add(u)},keyUp(m){p.delete(m.toLowerCase())},clearKeys(){p.clear()},frameArrived(){let m=1-s;a*=m,l*=m,d*=m},tick(m){if(f===null){f=m;return}let u=Math.max(0,Math.min(100,m-f))/1e3;f=m,p.has("w")&&(d=b(d+r*u,c)),p.has("s")&&(d=b(d-r*u,c)),p.has("a")&&(a=b(a+o*u,n)),p.has("d")&&(a=b(a-o*u,n));let g=Math.exp(-u*1e3/t);a*=g,l*=g,d*=g},transform(){return{translateX:a,translateY:l,scale:Math.exp(d)}},isIdentity(m=5e-4){return Math.abs(a)<m&&Math.abs(l)<m&&Math.abs(d)<m},reset(){a=0,l=0,d=0,p.clear()}}}export{me as ACTIVATION_COLD_BOOT_AFTER_MS,ge as ACTIVATION_DEGRADED_AFTER_MS,he as ACTIVATION_HINT_PATH,pe as ACTIVATION_STILL_AFTER_MS,rt as ACTIVITY_DOM_EVENTS,Qe as ACTIVITY_FIELD,tt as ACTIVITY_STAMP_MIN_INTERVAL_MS,be as ActivationMonitor,It as App,Ee as BACKOFF_BASE_MS,we as BACKOFF_MAX_ATTEMPTS,ve as BACKOFF_MAX_MS,de as COLD_BOOT_WHEN_LIVE_TIMEOUT_MS,T as CaptureController,_ as CaptureUnavailableError,S as ClientTokenError,k as CreditsClient,y as CreditsError,v as CreditsUnauthorizedError,Ht as DATA_CHANNEL_MESSAGE_CEILING,xt as DEFAULT_DOC_SYNC_TIMEOUT_MS,D as DEFAULT_GATEWAY_URL,J as DEFAULT_PRODUCE_ACK_TIMEOUT_MS,Kt as DEFAULT_REFERENCE_JPEG_QUALITY,zt as DEFAULT_REFERENCE_MAX_SIZE,ce as DEFAULT_WHEN_LIVE_TIMEOUT_MS,ze as DERIVED_LEG_SEP,ht as DGRAM_HEADER_BYTES,ot as FOCUS_FIELD,ct as FOREGROUND_COALESCE_MS,bt as FrameReassembler,Xe as GENERATION_TICK_EMIT_INTERVAL_MS,Je as GENERATION_TICK_MAX_EXTRAPOLATION_MS,qt as INPUT_PRESENCE_DEFAULT_HZ,B as INPUT_PRESENCE_FIELD,Fe as InvalidDurationError,Se as LEGACY_ACTIVATION_HINT_PATH,fe as PLATFORM_DOC_NAME,Ne as PermanentLockedError,Ue as PinRequiresActiveTempError,at as PresenceTracker,Z as ProduceAckTimeoutError,De as RecordingNotFoundError,Ge as RecordingsClient,Me as RecordingsError,Oe as RecordingsUnauthorizedError,Q as RequestAbortError,ee as RequestCancelledError,Y as RequestDocSyncError,K as RequestError,H as RequestTimeoutError,Le as RetainNotTempError,Ae as RuntimeArtifactNotFoundError,Ie as RuntimeArtifactsClient,xe as RuntimeArtifactsError,Ce as RuntimeArtifactsUnauthorizedError,Ye as SIGNALING_PROTOCOL_VERSION,$e as STREAM_END,Ct as Session,oe as SessionAllocationError,At as SessionDirectory,z as SessionDirectoryError,V as SessionEndError,q as SessionEndUnavailableError,re as SessionFailedError,X as StreamDirectionConflict,_t as TransportNegotiator,ie as TransportSessionMismatchError,Tt as TransportSessionSignaling,L as URUN_DEV_ENV,it as USER_ACTIVITY_FIELD,st as USER_ACTIVITY_MIN_INTERVAL_MS,et as VISIBILITY_FIELD,Yt as WIRE_MESSAGE_BUDGET,mt as WT_CONTROL_FRAME_MAX,Et as WT_DATA_STREAM_VERSION,Rt as WebRtcSession,kt as WebTransportSession,ft as WtControlDecoder,vt as WtDataStreamParser,ye as activationHintFrom,tr as cameraCaptureAvailable,rr as captureStillFromVideo,ke as computeBackoffDelay,wt as consumeWtDataStreams,nt as createActivityTracker,ir as createCameraWarp,Ot as createClientToken,Bt as createCreditsClient,Vt as createInputPresencePublisher,je as createRecordingsClient,Pe as createRuntimeArtifactsClient,Dt as createStore,Ve as decodeStreamEnvelope,He as derivedLegName,Ke as derivedLegRole,te as describeSessionFailure,le as describeSessionPhase,qe as encodeStreamEnvelope,gt as encodeWtControlFrame,I as fitWithin,Be as isDurationString,ae as isPausedPhase,Nt as isPendingRecording,_e as isRetryableSessionError,se as isWakingPhase,pt as mediaRecorderChunkSource,Qt as normalizeReferenceImage,We as normalizeRetention,lt as observeLeaveConfirm,dt as observePageLifecycle,ut as observePageTeardown,St as parseDgramHeader,Re as prewake,er as referenceImageErrorMessage,Te as releaseSessionBeacon,Pt as sessionDirectory,ne as sessionFailureFromMediaError,$t as sharedCaptureController,Ut as videoStream,Ze as watchGenerationTick,ue as whenLive,yt as writeDgramHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl,
|
|
1
|
+
export { a as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl, am as SessionStartOptions, ay as StreamDataTransport, aD as TransportSession, aE as TransportSessionOptions, aU as allocateSession, aW as createPresence, aX as createWebsocketDocConnector, aZ as deriveYjsServerUrl, b7 as streamDataLabel, b8 as transportStreamData } from './stream-data-Ds1Nj4Xb.mjs';
|
|
2
2
|
import 'yjs';
|
|
3
3
|
import 'y-protocols/awareness';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl,
|
|
1
|
+
export { a as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl, am as SessionStartOptions, ay as StreamDataTransport, aD as TransportSession, aE as TransportSessionOptions, aU as allocateSession, aW as createPresence, aX as createWebsocketDocConnector, aZ as deriveYjsServerUrl, b7 as streamDataLabel, b8 as transportStreamData } from './stream-data-Ds1Nj4Xb.js';
|
|
2
2
|
import 'yjs';
|
|
3
3
|
import 'y-protocols/awareness';
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as n,B as a,M as s,
|
|
1
|
+
import{A as n,B as a,M as s,Y as p,Z as c,_ as l,a as e,b as o,da as m,ea as i,fa as S,ga as f,ha as x,ia as C,ja as D,y as r,z as t}from"./chunk-ABECL5VR.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,s as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,a as ensureNodeWebRTC,r as isNodeRuntime,t as nodeMediasoupHandlerName,n as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl,
|
|
1
|
+
export { A as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl, am as SessionStartOptions, ay as StreamDataTransport, aD as TransportSession, aE as TransportSessionOptions, aU as allocateSession, aW as createPresence, aX as createWebsocketDocConnector, aZ as deriveYjsServerUrl, b7 as streamDataLabel, b8 as transportStreamData } from './stream-data-f_tTf2uF.mjs';
|
|
2
2
|
import 'yjs';
|
|
3
3
|
import 'y-protocols/awareness';
|
|
4
4
|
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl,
|
|
1
|
+
export { A as AccessTokenOptions, e as AllocateSessionOptions, f as AllocatedSession, k as ChannelMessage, l as ChannelMultiplexer, m as ChannelName, p as DOC_SYNC_WIRE_CONTRACT_VERSION, q as DeferredChannelMultiplexer, r as DeferredDocConnector, u as DocConnection, v as DocConnectionState, w as DocConnector, x as DocServerUrlResolver, y as DocTokenSupplier, L as LoopbackStreamData, af as SessionDocumentImpl, am as SessionStartOptions, ay as StreamDataTransport, aD as TransportSession, aE as TransportSessionOptions, aU as allocateSession, aW as createPresence, aX as createWebsocketDocConnector, aZ as deriveYjsServerUrl, b7 as streamDataLabel, b8 as transportStreamData } from './stream-data-f_tTf2uF.js';
|
|
2
2
|
import 'yjs';
|
|
3
3
|
import 'y-protocols/awareness';
|
|
4
4
|
|
package/dist/internal.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __urunCreateRequire } from 'node:module'; const require = globalThis.require ?? __urunCreateRequire(import.meta.url);
|
|
2
|
-
import{A as n,B as a,M as s,
|
|
2
|
+
import{A as n,B as a,M as s,Y as p,Z as c,_ as l,a as e,b as o,da as m,ea as i,fa as S,ga as f,ha as x,ia as C,ja as D,y as r,z as t}from"./chunk-ZPXAXTXU.mjs";import"./chunk-NLAOQUYQ.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,s as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,a as ensureNodeWebRTC,r as isNodeRuntime,t as nodeMediasoupHandlerName,n as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
|
|
@@ -848,6 +848,8 @@ interface SessionDirectoryRequestOptions {
|
|
|
848
848
|
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
849
849
|
authProvider?: string;
|
|
850
850
|
}
|
|
851
|
+
|
|
852
|
+
type SessionNameSource = 'user' | 'auto';
|
|
851
853
|
interface PrewakeOptions {
|
|
852
854
|
baseUrl: string;
|
|
853
855
|
|
|
@@ -1787,4 +1789,4 @@ interface DataChannelTransport {
|
|
|
1787
1789
|
|
|
1788
1790
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1789
1791
|
|
|
1790
|
-
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a,
|
|
1792
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, derivedLegRole as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, TransportNegotiator as aA, type TransportOfferRequest as aB, type TransportOfferResponse as aC, TransportSession as aD, type TransportSessionOptions as aE, TransportSessionSignaling as aF, type TransportState as aG, type VideoPlayoutOptions as aH, WT_CONTROL_FRAME_MAX as aI, WT_DATA_STREAM_VERSION as aJ, type WatchGenerationTickOptions as aK, type WtAudioLaneSeam as aL, type WtAudioUplinkSeam as aM, WtControlDecoder as aN, type WtControlMessage as aO, type WtDataEnvelope as aP, type WtDataLaneSink as aQ, WtDataStreamParser as aR, WtDataUplinkSender as aS, type WtVideoUplinkSeam as aT, allocateSession as aU, consumeWtDataStreams as aV, createPresence as aW, createWebsocketDocConnector as aX, decodeStreamEnvelope as aY, deriveYjsServerUrl as aZ, derivedLegName as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionNameSource as ai, type SessionPhase as aj, type SessionPhaseError as ak, type SessionPhaseName as al, type SessionStartOptions as am, type SessionStatsOptions as an, type SessionStatsSample as ao, type SessionStatus as ap, type SessionStream as aq, type SessionText as ar, type SignalCarrier as as, type Signaling as at, type StartSessionOptions as au, type Store as av, type StoreOptions as aw, type StreamChunkOptions as ax, type StreamDataTransport as ay, type TransportEstablishedNotify as az, type ActivationEvent as b, encodeStreamEnvelope as b0, encodeWtControlFrame as b1, isPendingRecording as b2, mediaRecorderChunkSource as b3, parseDgramHeader as b4, prewake as b5, releaseSessionBeacon as b6, streamDataLabel as b7, transportStreamData as b8, watchGenerationTick as b9, writeDgramHeader as ba, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|
|
@@ -848,6 +848,8 @@ interface SessionDirectoryRequestOptions {
|
|
|
848
848
|
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
849
849
|
authProvider?: string;
|
|
850
850
|
}
|
|
851
|
+
|
|
852
|
+
type SessionNameSource = 'user' | 'auto';
|
|
851
853
|
interface PrewakeOptions {
|
|
852
854
|
baseUrl: string;
|
|
853
855
|
|
|
@@ -1787,4 +1789,4 @@ interface DataChannelTransport {
|
|
|
1787
1789
|
|
|
1788
1790
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1789
1791
|
|
|
1790
|
-
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a,
|
|
1792
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, derivedLegRole as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, TransportNegotiator as aA, type TransportOfferRequest as aB, type TransportOfferResponse as aC, TransportSession as aD, type TransportSessionOptions as aE, TransportSessionSignaling as aF, type TransportState as aG, type VideoPlayoutOptions as aH, WT_CONTROL_FRAME_MAX as aI, WT_DATA_STREAM_VERSION as aJ, type WatchGenerationTickOptions as aK, type WtAudioLaneSeam as aL, type WtAudioUplinkSeam as aM, WtControlDecoder as aN, type WtControlMessage as aO, type WtDataEnvelope as aP, type WtDataLaneSink as aQ, WtDataStreamParser as aR, WtDataUplinkSender as aS, type WtVideoUplinkSeam as aT, allocateSession as aU, consumeWtDataStreams as aV, createPresence as aW, createWebsocketDocConnector as aX, decodeStreamEnvelope as aY, deriveYjsServerUrl as aZ, derivedLegName as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionNameSource as ai, type SessionPhase as aj, type SessionPhaseError as ak, type SessionPhaseName as al, type SessionStartOptions as am, type SessionStatsOptions as an, type SessionStatsSample as ao, type SessionStatus as ap, type SessionStream as aq, type SessionText as ar, type SignalCarrier as as, type Signaling as at, type StartSessionOptions as au, type Store as av, type StoreOptions as aw, type StreamChunkOptions as ax, type StreamDataTransport as ay, type TransportEstablishedNotify as az, type ActivationEvent as b, encodeStreamEnvelope as b0, encodeWtControlFrame as b1, isPendingRecording as b2, mediaRecorderChunkSource as b3, parseDgramHeader as b4, prewake as b5, releaseSessionBeacon as b6, streamDataLabel as b7, transportStreamData as b8, watchGenerationTick as b9, writeDgramHeader as ba, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|
|
@@ -848,6 +848,8 @@ interface SessionDirectoryRequestOptions {
|
|
|
848
848
|
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
849
849
|
authProvider?: string;
|
|
850
850
|
}
|
|
851
|
+
|
|
852
|
+
type SessionNameSource = 'user' | 'auto';
|
|
851
853
|
interface PrewakeOptions {
|
|
852
854
|
baseUrl: string;
|
|
853
855
|
|
|
@@ -1787,4 +1789,4 @@ interface DataChannelTransport {
|
|
|
1787
1789
|
|
|
1788
1790
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1789
1791
|
|
|
1790
|
-
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions$1 as a,
|
|
1792
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions$1 as a, derivedLegRole as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, TransportNegotiator as aA, type TransportOfferRequest as aB, type TransportOfferResponse as aC, TransportSession as aD, type TransportSessionOptions as aE, TransportSessionSignaling as aF, type TransportState as aG, type VideoPlayoutOptions as aH, WT_CONTROL_FRAME_MAX as aI, WT_DATA_STREAM_VERSION as aJ, type WatchGenerationTickOptions as aK, type WtAudioLaneSeam as aL, type WtAudioUplinkSeam as aM, WtControlDecoder as aN, type WtControlMessage as aO, type WtDataEnvelope as aP, type WtDataLaneSink as aQ, WtDataStreamParser as aR, WtDataUplinkSender as aS, type WtVideoUplinkSeam as aT, allocateSession as aU, consumeWtDataStreams as aV, createPresence as aW, createWebsocketDocConnector as aX, decodeStreamEnvelope as aY, deriveYjsServerUrl as aZ, derivedLegName as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionNameSource as ai, type SessionPhase as aj, type SessionPhaseError as ak, type SessionPhaseName as al, type SessionStartOptions as am, type SessionStatsOptions as an, type SessionStatsSample as ao, type SessionStatus as ap, type SessionStream as aq, type SessionText as ar, type SignalCarrier as as, type Signaling as at, type StartSessionOptions as au, type Store as av, type StoreOptions as aw, type StreamChunkOptions as ax, type StreamDataTransport as ay, type TransportEstablishedNotify as az, type ActivationEvent as b, encodeStreamEnvelope as b0, encodeWtControlFrame as b1, isPendingRecording as b2, mediaRecorderChunkSource as b3, parseDgramHeader as b4, prewake as b5, releaseSessionBeacon as b6, streamDataLabel as b7, transportStreamData as b8, watchGenerationTick as b9, writeDgramHeader as ba, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|
|
@@ -848,6 +848,8 @@ interface SessionDirectoryRequestOptions {
|
|
|
848
848
|
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
849
849
|
authProvider?: string;
|
|
850
850
|
}
|
|
851
|
+
|
|
852
|
+
type SessionNameSource = 'user' | 'auto';
|
|
851
853
|
interface PrewakeOptions {
|
|
852
854
|
baseUrl: string;
|
|
853
855
|
|
|
@@ -1787,4 +1789,4 @@ interface DataChannelTransport {
|
|
|
1787
1789
|
|
|
1788
1790
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1789
1791
|
|
|
1790
|
-
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions$1 as a,
|
|
1792
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions$1 as a, derivedLegRole as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, TransportNegotiator as aA, type TransportOfferRequest as aB, type TransportOfferResponse as aC, TransportSession as aD, type TransportSessionOptions as aE, TransportSessionSignaling as aF, type TransportState as aG, type VideoPlayoutOptions as aH, WT_CONTROL_FRAME_MAX as aI, WT_DATA_STREAM_VERSION as aJ, type WatchGenerationTickOptions as aK, type WtAudioLaneSeam as aL, type WtAudioUplinkSeam as aM, WtControlDecoder as aN, type WtControlMessage as aO, type WtDataEnvelope as aP, type WtDataLaneSink as aQ, WtDataStreamParser as aR, WtDataUplinkSender as aS, type WtVideoUplinkSeam as aT, allocateSession as aU, consumeWtDataStreams as aV, createPresence as aW, createWebsocketDocConnector as aX, decodeStreamEnvelope as aY, deriveYjsServerUrl as aZ, derivedLegName as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionNameSource as ai, type SessionPhase as aj, type SessionPhaseError as ak, type SessionPhaseName as al, type SessionStartOptions as am, type SessionStatsOptions as an, type SessionStatsSample as ao, type SessionStatus as ap, type SessionStream as aq, type SessionText as ar, type SignalCarrier as as, type Signaling as at, type StartSessionOptions as au, type Store as av, type StoreOptions as aw, type StreamChunkOptions as ax, type StreamDataTransport as ay, type TransportEstablishedNotify as az, type ActivationEvent as b, encodeStreamEnvelope as b0, encodeWtControlFrame as b1, isPendingRecording as b2, mediaRecorderChunkSource as b3, parseDgramHeader as b4, prewake as b5, releaseSessionBeacon as b6, streamDataLabel as b7, transportStreamData as b8, watchGenerationTick as b9, writeDgramHeader as ba, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|