openrtc 2.9.6 → 2.9.7

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.
Files changed (59) hide show
  1. package/dist/BrowserManagedBroadcastHost-6VGHQQMF.js +1 -0
  2. package/dist/{Connection-gaN-X7kf.d.ts → Connection-BnvlCzDH.d.ts} +9 -0
  3. package/dist/{DelegatingRuntimeAdapter-Bh0rLvly.d.ts → DelegatingRuntimeAdapter-B59yqg9k.d.ts} +2 -2
  4. package/dist/{IpcRuntimeAdapter-DZj7Rn-o.d.ts → IpcRuntimeAdapter-pGzBlskr.d.ts} +2 -2
  5. package/dist/{WasmBridge-3TYL6SE7.js → WasmBridge-EW7GOAP5.js} +1 -1
  6. package/dist/{assembly-DX6MlDlZ.d.ts → assembly-CPvHubSz.d.ts} +2 -2
  7. package/dist/{capabilities-wJO8ZWyF.d.ts → capabilities-CE2X3OJd.d.ts} +1 -1
  8. package/dist/{chunk-RB4UWXK6.js → chunk-5VJXDYP6.js} +1 -1
  9. package/dist/{chunk-TRUMV4SI.js → chunk-ANCL2KAD.js} +1 -1
  10. package/dist/{chunk-FXVEX4SB.js → chunk-BVA7DDVI.js} +1 -1
  11. package/dist/chunk-IXQ4KWGP.js +2 -0
  12. package/dist/{chunk-DZR5WWVW.js → chunk-NINTIQO2.js} +1 -1
  13. package/dist/{chunk-DMCUS3TY.js → chunk-OEGUDN5D.js} +2 -2
  14. package/dist/{chunk-QO5WF4IG.js → chunk-QTPMI6LY.js} +1 -1
  15. package/dist/{chunk-AZHDR5G7.js → chunk-RSH7KZHF.js} +1 -1
  16. package/dist/{chunk-TOKXRZSS.js → chunk-TOMWC3YH.js} +1 -1
  17. package/dist/{chunk-XMYBBLYK.js → chunk-YC3Z2WPG.js} +2 -2
  18. package/dist/coreClient.d.ts +3 -3
  19. package/dist/coreClient.js +1 -1
  20. package/dist/{deviceHandle-2DLEXKFM.js → deviceHandle-SOL4FCTQ.js} +1 -1
  21. package/dist/external-broadcast.d.ts +4 -4
  22. package/dist/external-broadcast.js +1 -1
  23. package/dist/index.d.ts +6 -6
  24. package/dist/index.js +1 -1
  25. package/dist/{ipcFactory-7DTAMYUQ.js → ipcFactory-6GUTWKE2.js} +1 -1
  26. package/dist/native.d.ts +5 -5
  27. package/dist/native.js +1 -1
  28. package/dist/node.d.ts +6 -6
  29. package/dist/node.js +2 -2
  30. package/dist/{openrtc-DW7MUYZN.js → openrtc-TRNJN6OO.js} +1 -1
  31. package/dist/openrtc_bg.wasm +0 -0
  32. package/dist/{room-5FG5L44X.js → room-TGUGB6LR.js} +1 -1
  33. package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -3
  34. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  35. package/dist/runtime/device-status.d.ts +1 -1
  36. package/dist/runtime/factories.d.ts +5 -5
  37. package/dist/runtime/factories.js +1 -1
  38. package/dist/runtime/index.d.ts +9 -9
  39. package/dist/runtime/index.js +1 -1
  40. package/dist/server-browser.d.ts +4 -4
  41. package/dist/server.d.ts +4 -4
  42. package/dist/server.js +1 -1
  43. package/dist/service-node.d.ts +4 -4
  44. package/dist/service-node.js +1 -1
  45. package/dist/testing/native.d.ts +4 -4
  46. package/dist/testing/native.js +1 -1
  47. package/dist/testing.d.ts +4 -4
  48. package/dist/testing.js +1 -1
  49. package/dist/transport/index.d.ts +2 -2
  50. package/dist/{types-CzogmfJl.d.ts → types-hsbgpJlL.d.ts} +1 -1
  51. package/native/darwin-arm64/openrtc-node-host +0 -0
  52. package/native/darwin-arm64/openrtc-node-host.manifest.json +4 -4
  53. package/native/darwin-x64/openrtc-node-host +0 -0
  54. package/native/darwin-x64/openrtc-node-host.manifest.json +4 -4
  55. package/native/linux-x64/openrtc-node-host +0 -0
  56. package/native/linux-x64/openrtc-node-host.manifest.json +4 -4
  57. package/package.json +1 -1
  58. package/dist/BrowserManagedBroadcastHost-GLSYJIOR.js +0 -1
  59. package/dist/chunk-BGWJHPBC.js +0 -2
@@ -1 +1 @@
1
- export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';export{h as ConnectionActor,e as ConnectionActorError,i as ConnectionActors,a as ConnectionController,s as IpcRuntimeAdapter,r as RuntimeClient,d as clog,p as concatRuntimeBytes,f as connectionActorKey,g as connectionActorKeyString,o as createJsonDecoder,k as createU32Decoder,m as decodeJsonPayload,n as encodeJsonFrame,l as encodeJsonPayload,j as encodeU32Frame,c as grantCorrelation,q as readRuntimeU32BE,b as renderCorrelation}from'../chunk-AZHDR5G7.js';import'../chunk-BGWJHPBC.js';import'../chunk-DZR5WWVW.js';export{q as BROWSER_CAPABILITIES,r as NATIVE_CAPABILITIES,o as RUNTIME_POLICY,t as browserCapabilities,v as capabilityProfile,s as cloneCapabilities,p as getRuntimePolicy,h as logTeardownTrace,d as openRtcDebug,c as openRtcDebugEnabled,e as openRtcDebugInfo,f as openRtcDebugLog,u as statusCapabilities}from'../chunk-DMCUS3TY.js';import'../chunk-XMYBBLYK.js';import'../chunk-TYZS5LXQ.js';import'../chunk-OT7IPLZE.js';import'../chunk-OWKAJPOI.js';import'../chunk-COXQYBTI.js';export{a as classifyIpcFailure,b as isIpcUnavailable}from'../chunk-72NEEJQG.js';import'../chunk-L2ZZXECX.js';export{c as runtimeFromCapability}from'../chunk-TRUMV4SI.js';import'../chunk-FKAQDDUM.js';import'../chunk-ZA44REGI.js';import'../chunk-2QE5HAPB.js';import'../chunk-CCCYE3XN.js';import'../chunk-JPBW67B3.js';import'../chunk-F5ORG763.js';import'../chunk-WALOTASO.js';import'../chunk-2GX6GB6L.js';
1
+ export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';export{h as ConnectionActor,e as ConnectionActorError,i as ConnectionActors,a as ConnectionController,s as IpcRuntimeAdapter,r as RuntimeClient,d as clog,p as concatRuntimeBytes,f as connectionActorKey,g as connectionActorKeyString,o as createJsonDecoder,k as createU32Decoder,m as decodeJsonPayload,n as encodeJsonFrame,l as encodeJsonPayload,j as encodeU32Frame,c as grantCorrelation,q as readRuntimeU32BE,b as renderCorrelation}from'../chunk-RSH7KZHF.js';import'../chunk-IXQ4KWGP.js';import'../chunk-NINTIQO2.js';export{q as BROWSER_CAPABILITIES,r as NATIVE_CAPABILITIES,o as RUNTIME_POLICY,t as browserCapabilities,v as capabilityProfile,s as cloneCapabilities,p as getRuntimePolicy,h as logTeardownTrace,d as openRtcDebug,c as openRtcDebugEnabled,e as openRtcDebugInfo,f as openRtcDebugLog,u as statusCapabilities}from'../chunk-OEGUDN5D.js';import'../chunk-YC3Z2WPG.js';import'../chunk-TYZS5LXQ.js';import'../chunk-OT7IPLZE.js';import'../chunk-OWKAJPOI.js';import'../chunk-COXQYBTI.js';export{a as classifyIpcFailure,b as isIpcUnavailable}from'../chunk-72NEEJQG.js';import'../chunk-L2ZZXECX.js';export{c as runtimeFromCapability}from'../chunk-ANCL2KAD.js';import'../chunk-FKAQDDUM.js';import'../chunk-ZA44REGI.js';import'../chunk-2QE5HAPB.js';import'../chunk-CCCYE3XN.js';import'../chunk-JPBW67B3.js';import'../chunk-F5ORG763.js';import'../chunk-WALOTASO.js';import'../chunk-2GX6GB6L.js';
@@ -1,9 +1,9 @@
1
1
  export { AuthorityAssignmentInput, AuthorityInterestAssignment, AuthorityServiceGrant, AuthorityServiceGrantRequest, Ed25519Signer } from './service-node.js';
2
- import './types-CzogmfJl.js';
2
+ import './types-hsbgpJlL.js';
3
3
  import './coreClient.js';
4
- import './assembly-DX6MlDlZ.js';
5
- import './Connection-gaN-X7kf.js';
6
- import './capabilities-wJO8ZWyF.js';
4
+ import './assembly-CPvHubSz.js';
5
+ import './Connection-BnvlCzDH.js';
6
+ import './capabilities-CE2X3OJd.js';
7
7
 
8
8
  /** Browser export for `openrtc/server`; secret-bearing helpers are unavailable. */
9
9
 
package/dist/server.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Ed25519Signer, AuthorityServiceGrantRequest, AuthorityServiceGrant, AuthorityAssignmentInput, AuthorityInterestAssignment, DelegatedAuthorityGrantRequest } from './service-node.js';
2
- import './types-CzogmfJl.js';
2
+ import './types-hsbgpJlL.js';
3
3
  import './coreClient.js';
4
- import './assembly-DX6MlDlZ.js';
5
- import './Connection-gaN-X7kf.js';
6
- import './capabilities-wJO8ZWyF.js';
4
+ import './assembly-CPvHubSz.js';
5
+ import './Connection-BnvlCzDH.js';
6
+ import './capabilities-CE2X3OJd.js';
7
7
 
8
8
  /** Secret-bearing Node/server helpers. Do not import this entrypoint in browsers. */
9
9
 
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-QO5WF4IG.js';import'./chunk-TRUMV4SI.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';function y(n){let e=new URL(n??"https://api.openrtc.app"),t=e.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(e.hostname.toLowerCase());if(e.protocol!=="https:"&&!t||e.username||e.password||e.search||e.hash)throw new TypeError("[OpenRTC] authority control-plane endpoint is invalid.");return e.toString().replace(/\/$/,"")}function h(){if(typeof document<"u"||typeof window<"u")throw new Error("[OpenRTC] openrtc/server is unavailable in browsers; use openrtc/service-node with a delegated grant.")}var c=class{constructor(e){h();let t=e.secretKey?.trim()??"";if(!/^sk_(?:live|test)_[A-Za-z0-9_-]+$/.test(t))throw new TypeError("[OpenRTC] secretKey is invalid.");let i=e.fetch??globalThis.fetch;if(typeof i!="function")throw new TypeError("[OpenRTC] a Fetch-compatible implementation is required.");let u=y(e.endpoint);this.authority=new a({apiKey:e.apiKey,serviceId:e.serviceId,generation:e.generation,shardIds:e.shardIds,deviceId:e.deviceId,deviceSigner:e.deviceSigner,assignmentSigner:e.assignmentSigner,grantIssuer:async s=>{let r=await i(`${u}/v2/developer/authority/grants`,{method:"POST",headers:{authorization:`Bearer ${t}`,"content-type":"application/json","x-openrtc-idempotency-key":s.idempotencyKey},body:JSON.stringify(s.body)});if(!r.ok){let o=await r.json().catch(()=>null),d=typeof o?.error=="string"?o.error.slice(0,256):`HTTP ${r.status}`;throw new Error(`[OpenRTC] authority service grant failed: ${d}`)}return r.json()}});}requestGrant(e){return this.authority.requestGrant(e)}signAssignment(e){return this.authority.signAssignment(e)}devicePublicKey(){return this.authority.devicePublicKey()}signDeviceBytes(e){return this.authority.signDeviceBytes(e)}grantIssuer(){return async e=>{let t=e.body;return this.requestGrant({roomId:String(t.avenue?.id??""),runtimeInstanceId:String(t.runtimeInstanceId??""),ticketFingerprint:String(t.ticketFingerprint??""),maxPeers:typeof t.maxPeers=="number"?t.maxPeers:void 0,refreshGrant:typeof t.refreshGrant=="string"?t.refreshGrant:void 0,features:typeof t.features=="object"&&t.features?t.features:void 0})}}};
1
+ import {a}from'./chunk-QTPMI6LY.js';import'./chunk-ANCL2KAD.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';function y(n){let e=new URL(n??"https://api.openrtc.app"),t=e.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(e.hostname.toLowerCase());if(e.protocol!=="https:"&&!t||e.username||e.password||e.search||e.hash)throw new TypeError("[OpenRTC] authority control-plane endpoint is invalid.");return e.toString().replace(/\/$/,"")}function h(){if(typeof document<"u"||typeof window<"u")throw new Error("[OpenRTC] openrtc/server is unavailable in browsers; use openrtc/service-node with a delegated grant.")}var c=class{constructor(e){h();let t=e.secretKey?.trim()??"";if(!/^sk_(?:live|test)_[A-Za-z0-9_-]+$/.test(t))throw new TypeError("[OpenRTC] secretKey is invalid.");let i=e.fetch??globalThis.fetch;if(typeof i!="function")throw new TypeError("[OpenRTC] a Fetch-compatible implementation is required.");let u=y(e.endpoint);this.authority=new a({apiKey:e.apiKey,serviceId:e.serviceId,generation:e.generation,shardIds:e.shardIds,deviceId:e.deviceId,deviceSigner:e.deviceSigner,assignmentSigner:e.assignmentSigner,grantIssuer:async s=>{let r=await i(`${u}/v2/developer/authority/grants`,{method:"POST",headers:{authorization:`Bearer ${t}`,"content-type":"application/json","x-openrtc-idempotency-key":s.idempotencyKey},body:JSON.stringify(s.body)});if(!r.ok){let o=await r.json().catch(()=>null),d=typeof o?.error=="string"?o.error.slice(0,256):`HTTP ${r.status}`;throw new Error(`[OpenRTC] authority service grant failed: ${d}`)}return r.json()}});}requestGrant(e){return this.authority.requestGrant(e)}signAssignment(e){return this.authority.signAssignment(e)}devicePublicKey(){return this.authority.devicePublicKey()}signDeviceBytes(e){return this.authority.signDeviceBytes(e)}grantIssuer(){return async e=>{let t=e.body;return this.requestGrant({roomId:String(t.avenue?.id??""),runtimeInstanceId:String(t.runtimeInstanceId??""),ticketFingerprint:String(t.ticketFingerprint??""),maxPeers:typeof t.maxPeers=="number"?t.maxPeers:void 0,refreshGrant:typeof t.refreshGrant=="string"?t.refreshGrant:void 0,features:typeof t.features=="object"&&t.features?t.features:void 0})}}};
2
2
  export{c as AuthorityServiceControlPlane};
@@ -1,8 +1,8 @@
1
- import { C as Client, X as Room, r as Connection } from './types-CzogmfJl.js';
1
+ import { C as Client, X as Room, r as Connection } from './types-hsbgpJlL.js';
2
2
  import './coreClient.js';
3
- import './assembly-DX6MlDlZ.js';
4
- import './Connection-gaN-X7kf.js';
5
- import './capabilities-wJO8ZWyF.js';
3
+ import './assembly-CPvHubSz.js';
4
+ import './Connection-BnvlCzDH.js';
5
+ import './capabilities-CE2X3OJd.js';
6
6
 
7
7
  /** Browser-safe and Node-host-neutral developer service-node facade. */
8
8
 
@@ -1 +1 @@
1
- export{a as DelegatedAuthorityService,b as ServiceNode}from'./chunk-QO5WF4IG.js';import'./chunk-TRUMV4SI.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';
1
+ export{a as DelegatedAuthorityService,b as ServiceNode}from'./chunk-QTPMI6LY.js';import'./chunk-ANCL2KAD.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';
@@ -1,10 +1,10 @@
1
- import { O as Options, C as Client } from '../types-CzogmfJl.js';
1
+ import { O as Options, C as Client } from '../types-hsbgpJlL.js';
2
2
  import { E as Endpoints } from '../protocol-BSBjMb7p.js';
3
3
  import { P as PlutoIpcBridge } from '../ipc-DgzKqHH3.js';
4
4
  import '../coreClient.js';
5
- import '../assembly-DX6MlDlZ.js';
6
- import '../Connection-gaN-X7kf.js';
7
- import '../capabilities-wJO8ZWyF.js';
5
+ import '../assembly-CPvHubSz.js';
6
+ import '../Connection-BnvlCzDH.js';
7
+ import '../capabilities-CE2X3OJd.js';
8
8
 
9
9
  declare function OpenRTC(options: Options, endpoints: Endpoints, bridge: PlutoIpcBridge): Client;
10
10
 
@@ -1 +1 @@
1
- import {a}from'../chunk-LJBVXWWV.js';import'../chunk-COXQYBTI.js';import {a as a$1}from'../chunk-NS32P65Z.js';import'../chunk-GMPEZXPD.js';import {i}from'../chunk-TRUMV4SI.js';import'../chunk-FKAQDDUM.js';import'../chunk-ZA44REGI.js';import'../chunk-2QE5HAPB.js';import'../chunk-CCCYE3XN.js';import'../chunk-JPBW67B3.js';import'../chunk-F5ORG763.js';import'../chunk-WALOTASO.js';import'../chunk-2GX6GB6L.js';function v(c,p,e){let o=new a;return i(c,{endpoints:p,testingAllowInsecureLoopback:true,platform:"native",close:()=>o.close(),deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:a}=await import('../ipcFactory-7DTAMYUQ.js');return a(t,e,o)}})}export{v as OpenRTC};
1
+ import {a}from'../chunk-LJBVXWWV.js';import'../chunk-COXQYBTI.js';import {a as a$1}from'../chunk-NS32P65Z.js';import'../chunk-GMPEZXPD.js';import {i}from'../chunk-ANCL2KAD.js';import'../chunk-FKAQDDUM.js';import'../chunk-ZA44REGI.js';import'../chunk-2QE5HAPB.js';import'../chunk-CCCYE3XN.js';import'../chunk-JPBW67B3.js';import'../chunk-F5ORG763.js';import'../chunk-WALOTASO.js';import'../chunk-2GX6GB6L.js';function v(c,p,e){let o=new a;return i(c,{endpoints:p,testingAllowInsecureLoopback:true,platform:"native",close:()=>o.close(),deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:a}=await import('../ipcFactory-6GUTWKE2.js');return a(t,e,o)}})}export{v as OpenRTC};
package/dist/testing.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { R as RoomArchitectureMode, aj as CoordinationGatewayGrantRequest, ak as CoordinationGatewayGrant } from './Connection-gaN-X7kf.js';
2
- import { a as AttestationProvider, b as AuthProvider, B as BotVerificationProvider, e as BroadcastGrant, d as BroadcastCreateOptions, f as BroadcastInvite, g as BroadcastInviteOptions, D as Delivery, t as DeviceProfile, O as Options, C as Client } from './types-CzogmfJl.js';
1
+ import { R as RoomArchitectureMode, aj as CoordinationGatewayGrantRequest, ak as CoordinationGatewayGrant } from './Connection-BnvlCzDH.js';
2
+ import { a as AttestationProvider, b as AuthProvider, B as BotVerificationProvider, e as BroadcastGrant, d as BroadcastCreateOptions, f as BroadcastInvite, g as BroadcastInviteOptions, D as Delivery, t as DeviceProfile, O as Options, C as Client } from './types-hsbgpJlL.js';
3
3
  import { E as Endpoints } from './protocol-BSBjMb7p.js';
4
4
  import './coreClient.js';
5
- import './assembly-DX6MlDlZ.js';
6
- import './capabilities-wJO8ZWyF.js';
5
+ import './assembly-CPvHubSz.js';
6
+ import './capabilities-CE2X3OJd.js';
7
7
 
8
8
  interface DeviceProof {
9
9
  publicKeyJwk: JsonWebKey;
package/dist/testing.js CHANGED
@@ -1 +1 @@
1
- import {a}from'./chunk-IJXTRVQS.js';import {a as a$1}from'./chunk-IAYQJZQQ.js';import {a as a$2,d,c}from'./chunk-L2ZZXECX.js';import'./chunk-GMPEZXPD.js';import {i}from'./chunk-TRUMV4SI.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';function v(i,o,e){let n=s=>{let t=new URL(s);return t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname)&&Number(t.port)>0&&t.pathname==="/"&&!t.username&&!t.password&&!t.search&&!t.hash};if(i.apiKey!=="pk_test_0000000000000000000000000000000000000000"||!n(o.controlPlane)||!n(o.gateway)||!/^[A-Za-z0-9_-]{1,64}$/.test(e.keyNamespace))throw new Error("Local broadcast testing requires the disposable loopback service lane")}function b(i){let o=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(Math.ceil(i.length/4)*4,"=");return Uint8Array.from(atob(o),e=>e.charCodeAt(0))}function A(i,o,e){return new a(i,o,a$1(e))}function R(i$1,o,e={}){if(e.localBroadcast&&v(i$1,o,e.localBroadcast),e.initialTicketLifetimeMs!==void 0){let t=(p,c)=>{let a=new URL(p);return a.protocol===c&&["127.0.0.1","[::1]"].includes(a.hostname)&&Number(a.port)>0&&a.pathname==="/"&&!a.username&&!a.password&&!a.search&&!a.hash};if(e.initialTicketLifetimeMs!==9e4||i$1.apiKey!=="pk_test_0000000000000000000000000000000000000000"||!t(o.controlPlane,"http:")||!t(o.gateway,"http:")||!e.irohTestRelayUrl||!t(e.irohTestRelayUrl,"https:"))throw new Error("Short initial tickets require the disposable local service lane")}let n=e.localBroadcast,s=n?a$1(n.keyNamespace):void 0;return i(i$1,{endpoints:o,testingAllowInsecureLoopback:true,platform:"web",...s?{deviceKeyProvider:s}:{},...n&&s?{broadcastHostFactory:async t=>{let[{BrowserManagedBroadcastHost:p},{loadBrowserWasmRuntimeModule:c}]=await Promise.all([import('./BrowserManagedBroadcastHost-GLSYJIOR.js'),import('./WasmBridge-3TYL6SE7.js')]),a=c().then(async r=>(await r.initWasm(),r.start(),new r.WasmClient(t.apiKey))),y=await s.getOrCreate(`app_${t.apiKey.slice(-16)}`);return new p({resolve:async(r,l)=>({token:r,...await n.resolve(r,l),signBindingChallenge:async m=>b(await y.sign(m))}),loadWasm:()=>a})}}:{},...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:p}=await import('./runtime/factories.js'),c$1=await p(t);if(e.initialTicketLifetimeMs!==void 0){let a=c$1.runtime,y=a.getTicketWithToken.bind(a);a.getTicketWithToken=async(r,l=0)=>{if(a.getTicketWithToken=y,!r.startsWith("v2:room:"))throw new Error("Short initial ticket requires room scope");let{irohTicket:m,tokenSuffix:u}=a$2(await y(r,l)),d$1=u&&d(m,u);if(!d$1||!d$1.t||d$1.s!==r||d$1.m!==l)throw new Error("Invalid initial service ticket");let f=Date.now()+9e4;return await a.registerToken({token:d$1.t,scope:r,maxConnections:l,expiresAtMs:f}),c(m,d$1.t,r,l,f)};}return c$1}})}export{R as OpenRTC,A as controlPlane};
1
+ import {a}from'./chunk-IJXTRVQS.js';import {a as a$1}from'./chunk-IAYQJZQQ.js';import {a as a$2,d,c}from'./chunk-L2ZZXECX.js';import'./chunk-GMPEZXPD.js';import {i}from'./chunk-ANCL2KAD.js';import'./chunk-FKAQDDUM.js';import'./chunk-ZA44REGI.js';import'./chunk-2QE5HAPB.js';import'./chunk-CCCYE3XN.js';import'./chunk-JPBW67B3.js';import'./chunk-F5ORG763.js';import'./chunk-WALOTASO.js';import'./chunk-2GX6GB6L.js';function v(i,o,e){let n=s=>{let t=new URL(s);return t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname)&&Number(t.port)>0&&t.pathname==="/"&&!t.username&&!t.password&&!t.search&&!t.hash};if(i.apiKey!=="pk_test_0000000000000000000000000000000000000000"||!n(o.controlPlane)||!n(o.gateway)||!/^[A-Za-z0-9_-]{1,64}$/.test(e.keyNamespace))throw new Error("Local broadcast testing requires the disposable loopback service lane")}function b(i){let o=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(Math.ceil(i.length/4)*4,"=");return Uint8Array.from(atob(o),e=>e.charCodeAt(0))}function A(i,o,e){return new a(i,o,a$1(e))}function R(i$1,o,e={}){if(e.localBroadcast&&v(i$1,o,e.localBroadcast),e.initialTicketLifetimeMs!==void 0){let t=(p,c)=>{let a=new URL(p);return a.protocol===c&&["127.0.0.1","[::1]"].includes(a.hostname)&&Number(a.port)>0&&a.pathname==="/"&&!a.username&&!a.password&&!a.search&&!a.hash};if(e.initialTicketLifetimeMs!==9e4||i$1.apiKey!=="pk_test_0000000000000000000000000000000000000000"||!t(o.controlPlane,"http:")||!t(o.gateway,"http:")||!e.irohTestRelayUrl||!t(e.irohTestRelayUrl,"https:"))throw new Error("Short initial tickets require the disposable local service lane")}let n=e.localBroadcast,s=n?a$1(n.keyNamespace):void 0;return i(i$1,{endpoints:o,testingAllowInsecureLoopback:true,platform:"web",...s?{deviceKeyProvider:s}:{},...n&&s?{broadcastHostFactory:async t=>{let[{BrowserManagedBroadcastHost:p},{loadBrowserWasmRuntimeModule:c}]=await Promise.all([import('./BrowserManagedBroadcastHost-6VGHQQMF.js'),import('./WasmBridge-EW7GOAP5.js')]),a=c().then(async r=>(await r.initWasm(),r.start(),new r.WasmClient(t.apiKey))),y=await s.getOrCreate(`app_${t.apiKey.slice(-16)}`);return new p({resolve:async(r,l)=>({token:r,...await n.resolve(r,l),signBindingChallenge:async m=>b(await y.sign(m))}),loadWasm:()=>a})}}:{},...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:p}=await import('./runtime/factories.js'),c$1=await p(t);if(e.initialTicketLifetimeMs!==void 0){let a=c$1.runtime,y=a.getTicketWithToken.bind(a);a.getTicketWithToken=async(r,l=0)=>{if(a.getTicketWithToken=y,!r.startsWith("v2:room:"))throw new Error("Short initial ticket requires room scope");let{irohTicket:m,tokenSuffix:u}=a$2(await y(r,l)),d$1=u&&d(m,u);if(!d$1||!d$1.t||d$1.s!==r||d$1.m!==l)throw new Error("Invalid initial service ticket");let f=Date.now()+9e4;return await a.registerToken({token:d$1.t,scope:r,maxConnections:l,expiresAtMs:f}),c(m,d$1.t,r,l,f)};}return c$1}})}export{R as OpenRTC,A as controlPlane};
@@ -1,5 +1,5 @@
1
- import { g as ProtocolName, at as RouteDescriptor, au as PayloadCrypto, av as CryptoStreams } from '../Connection-gaN-X7kf.js';
2
- export { aw as CryptoBiStream, ax as RouteFamily, ay as RouteKind } from '../Connection-gaN-X7kf.js';
1
+ import { g as ProtocolName, at as RouteDescriptor, au as PayloadCrypto, av as CryptoStreams } from '../Connection-BnvlCzDH.js';
2
+ export { aw as CryptoBiStream, ax as RouteFamily, ay as RouteKind } from '../Connection-BnvlCzDH.js';
3
3
 
4
4
  declare const TRANSPORT_LABELS: readonly ProtocolName[];
5
5
  declare function normalizeTransport(value: unknown): ProtocolName | undefined;
@@ -1,5 +1,5 @@
1
1
  import { PeerNamespace, ChannelNamespace, DiagnosticsNamespace, DeviceNamespace } from './coreClient.js';
2
- import { R as RoomArchitectureMode, b as RoomArchitectureSnapshot, c as RoomAuthorityAssignment, C as ChannelDescriptor, S as ServiceErrorObservation, P as PlutoIrohConfiguration, d as PlutoRTCConfiguration, e as PlutoMoQConfiguration, f as RouteOptimization, g as ProtocolName } from './Connection-gaN-X7kf.js';
2
+ import { R as RoomArchitectureMode, b as RoomArchitectureSnapshot, c as RoomAuthorityAssignment, C as ChannelDescriptor, S as ServiceErrorObservation, P as PlutoIrohConfiguration, d as PlutoRTCConfiguration, e as PlutoMoQConfiguration, f as RouteOptimization, g as ProtocolName } from './Connection-BnvlCzDH.js';
3
3
 
4
4
  interface AuthProvider {
5
5
  /** Registered provider ID from the developer app capability manifest. */
@@ -4,9 +4,9 @@
4
4
  "platform": "darwin",
5
5
  "arch": "arm64",
6
6
  "rustTarget": "aarch64-apple-darwin",
7
- "sourceCommit": "73b8c7f0abb8a42571c5977244d859fd65f3fedc",
8
- "sourceDigest": "20bfb1c9b57c3ee614cea37a5ac26597e9e23a5644002a083eb8e0d38ae4e1e8",
9
- "binarySha256": "dea4f9b67a6511f833824edc0fb5fa50027bcb200c8217398e45381e6e12e543",
7
+ "sourceCommit": "ea8bdec54c66c53db426539e8a2796d53a0b5767",
8
+ "sourceDigest": "3d8d1b289c0d9115b4389dc27391bc5f3e96d2dbe3081ea529c7c843f4e68e10",
9
+ "binarySha256": "8a4426e08a7f428adc257515590f28ed20b529ad4ad22b3848fe8d0a2d3e9abf",
10
10
  "protocol": {
11
11
  "lifecycleOwner": "rust-peer-session",
12
12
  "maxApplicationPayloadBytes": 65536,
@@ -16,5 +16,5 @@
16
16
  },
17
17
  "signingKeySha256": "0391c617f3df12611b419e129cace36fa792e73da03271649cbed9e9f9f155ef",
18
18
  "signatureAlgorithm": "ed25519",
19
- "signature": "/5cpKcweowCtfpLLJ24C5lpSGPfLadaITrGeUsqpHimEcjiCJGrB0xveobsmZQTvqnBGTavzFFncWrt2n3geAg=="
19
+ "signature": "L9k7HlMh0pFMlt/wxDBmJjz7DE979OWArEwESMRnQJK7X5sGP5mINTqFK8vHNAr+WKLv5DuLBNp5K1uXOey5BA=="
20
20
  }
Binary file
@@ -4,9 +4,9 @@
4
4
  "platform": "darwin",
5
5
  "arch": "x64",
6
6
  "rustTarget": "x86_64-apple-darwin",
7
- "sourceCommit": "73b8c7f0abb8a42571c5977244d859fd65f3fedc",
8
- "sourceDigest": "20bfb1c9b57c3ee614cea37a5ac26597e9e23a5644002a083eb8e0d38ae4e1e8",
9
- "binarySha256": "3e0a0aebdb94a6d20f7383388f19f48b52010a1937b657c4fdafab0b6ead25ed",
7
+ "sourceCommit": "ea8bdec54c66c53db426539e8a2796d53a0b5767",
8
+ "sourceDigest": "3d8d1b289c0d9115b4389dc27391bc5f3e96d2dbe3081ea529c7c843f4e68e10",
9
+ "binarySha256": "34de2754c62eb331b5d2b1ad651297674627d17eb20b6d11c59893f75fca7459",
10
10
  "protocol": {
11
11
  "lifecycleOwner": "rust-peer-session",
12
12
  "maxApplicationPayloadBytes": 65536,
@@ -16,5 +16,5 @@
16
16
  },
17
17
  "signingKeySha256": "0391c617f3df12611b419e129cace36fa792e73da03271649cbed9e9f9f155ef",
18
18
  "signatureAlgorithm": "ed25519",
19
- "signature": "GN/6XPUNXiktCHdxCSqMPUWmbmHbnuYripxGWuB6pPrgyS6ofBIrlhaLWUXKt+IBx4nOqoX0WAYkJeW+bFC2Bw=="
19
+ "signature": "6qqye9ub5KQ4G7Pw6N+5l4HWkIOvBIdQ194HKJImCzmeKu+/Xa2Wu++irXCq6HxNcS8hc/OqDmBYFz666cN3Cg=="
20
20
  }
Binary file
@@ -4,9 +4,9 @@
4
4
  "platform": "linux",
5
5
  "arch": "x64",
6
6
  "rustTarget": "x86_64-unknown-linux-gnu",
7
- "sourceCommit": "989a14d8b55d83ace8e1e1fa84aa9390e2af0e65",
8
- "sourceDigest": "20bfb1c9b57c3ee614cea37a5ac26597e9e23a5644002a083eb8e0d38ae4e1e8",
9
- "binarySha256": "4da7a063dcd6884ec3a9219ef1b3598bc77e9cb904efb803ff4492fe1f758fcd",
7
+ "sourceCommit": "bda34ba7b47f7fc17c8bd669b75b76c7096db121",
8
+ "sourceDigest": "3d8d1b289c0d9115b4389dc27391bc5f3e96d2dbe3081ea529c7c843f4e68e10",
9
+ "binarySha256": "bec7c1d9548f6b5a3c0504d95166b8e1776d460eb6edd54ce8d4a3aa6b80d497",
10
10
  "protocol": {
11
11
  "lifecycleOwner": "rust-peer-session",
12
12
  "maxApplicationPayloadBytes": 65536,
@@ -16,5 +16,5 @@
16
16
  },
17
17
  "signingKeySha256": "0391c617f3df12611b419e129cace36fa792e73da03271649cbed9e9f9f155ef",
18
18
  "signatureAlgorithm": "ed25519",
19
- "signature": "PYGsG/rY7zyvyHxhQXKxcTXUJHUlxjRzMRMYh0zHOEP4YpeigSYI4e6akh+rmUkbW01PisqIEHT96fuoY19CCA=="
19
+ "signature": "d3s7nwPwfMSZzkhWwBUgS/CBUsWzjTuTpGLAj6nfMpbSrp/28BVn83ChN16xu9fRkXp/OmaV5OiY/Mtuk6n9Dw=="
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrtc",
3
- "version": "2.9.6",
3
+ "version": "2.9.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1 +0,0 @@
1
- export{a as BrowserManagedBroadcastHost}from'./chunk-RB4UWXK6.js';import'./chunk-BGWJHPBC.js';import'./chunk-AYHD4X2R.js';import'./chunk-FKAQDDUM.js';import'./chunk-JPBW67B3.js';
@@ -1,2 +0,0 @@
1
- import*as i from'@moq/net';var l=class{constructor(e,t=new URL("https://localhost/")){this.transport=e;this.relayUrl=t;this.setupComplete=false;this.connection=null;this.closeListeners=[];this.closed=false;this.closeEmitted=false;this.setupResolve=null;this.setupPromise=new Promise(r=>{this.setupResolve=r;});}requireConnection(){if(this.closed||!this.connection||!this.setupComplete)throw new Error("MoQ Draft 14 session is not ready");return this.connection}async openObjectStreamDuplex(e,t,r){let s=e.trim(),n=t.trim(),o=r.trim();if(!s||!n||!o)throw new Error("MoQ carrier namespaces and track name must be non-empty");let c=this.requireConnection();if(typeof c.openObjectStreamDuplex!="function")throw new Error("MoQ Draft 14 reliable object streams are unavailable in this build");return c.openObjectStreamDuplex(i.Path.from(s),i.Path.from(n),o)}async init(){if(this.closed)throw new Error("MoQ session closed");if(this.connection)return;await this.transport.ready;let e=await i.Connection.connect(this.relayUrl,{transport:this.transport,websocket:{enabled:false}});if(e.version!=="moq-transport-14"&&e.version!=="moq-transport-16")throw e.close(),new Error(`MoQ relay negotiated unsupported protocol ${e.version}`);if(this.closed){e.close();return}this.connection=e,this.setupComplete=true,this.setupResolve?.(),this.setupResolve=null,e.closed.then(()=>this.emitClose("relay-session-closed"),t=>this.emitClose(t));}waitForSetup(){return this.setupPromise}onClose(e){return this.closeListeners.push(e),()=>{this.closeListeners=this.closeListeners.filter(t=>t!==e);}}close(){if(!this.closed){this.closed=true;try{this.connection?.close();}catch{}this.connection=null;try{this.transport.close();}catch{}this.emitClose("local-close");}}emitClose(e){if(!this.closeEmitted){this.closeEmitted=true,this.closed=true,this.setupComplete=false,this.connection=null;for(let t of [...this.closeListeners])try{t(e);}catch{}}}};function u(a,e,t){let r;return new Promise((s,n)=>{r=setTimeout(()=>{if(r=void 0,typeof t=="function"){n(t());return}let o=t?`${t} timed out`:"timeout";n(new Error(`${o} after ${e}ms`));},e),a.then(o=>{r!==void 0&&clearTimeout(r),s(o);},o=>{r!==void 0&&clearTimeout(r),n(o);});})}
2
- export{l as a,u as b};