openrtc 2.3.0 → 2.4.0
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/{ITransport-CjxCQ6q7.d.ts → Connection-DZ5eP5hL.d.ts} +445 -94
- package/dist/DelegatingRuntimeAdapter-4cgiIWMN.d.ts +150 -0
- package/dist/IpcRuntimeAdapter-Dduaxscj.d.ts +80 -0
- package/dist/WasmBridge-3W2HHADU.js +1 -0
- package/dist/{assembly-Bmi65-tK.d.ts → assembly-By3UBQsE.d.ts} +36 -19
- package/dist/{capabilities-BPuynml5.d.ts → capabilities-B2mHv_H7.d.ts} +2 -6
- package/dist/chunk-2GX6GB6L.js +1 -0
- package/dist/chunk-2LATKLCC.js +118 -0
- package/dist/{chunk-KRJECX7X.js → chunk-5XOLKH66.js} +1 -1
- package/dist/chunk-6OFAKLDB.js +2 -0
- package/dist/chunk-72NEEJQG.js +1 -0
- package/dist/chunk-BCGCJGIV.js +2 -0
- package/dist/chunk-GNW63SM6.js +2 -0
- package/dist/chunk-JPBW67B3.js +1 -0
- package/dist/chunk-MI3ZMVPK.js +2 -0
- package/dist/chunk-OT7IPLZE.js +1 -0
- package/dist/chunk-OWKAJPOI.js +1 -0
- package/dist/chunk-P2SHJMS3.js +1 -0
- package/dist/chunk-TYZS5LXQ.js +2 -0
- package/dist/chunk-WB66633N.js +1 -0
- package/dist/chunk-XEHBTMJQ.js +1 -0
- package/dist/chunk-YYI6AY6W.js +2 -0
- package/dist/{controlPlane-KVFZ7BR5.js → controlPlane-7E6KGQPP.js} +1 -1
- package/dist/coreClient.d.ts +3 -4
- package/dist/coreClient.js +1 -1
- package/dist/{deviceEnrollment-VACC64CQ.js → deviceEnrollment-CBJYXZ43.js} +2 -2
- package/dist/index.d.ts +6 -7
- package/dist/index.js +1 -1
- package/dist/{ipc-CPnNwv6f.d.ts → ipc-DgzKqHH3.d.ts} +3 -0
- package/dist/ipcFactory-4PCGKZIN.js +1 -0
- package/dist/native.d.ts +21 -0
- package/dist/native.js +1 -0
- package/dist/openrtc-5HAYVDHT.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/protocol-BSBjMb7p.d.ts +6 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -5
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +1 -2
- package/dist/runtime/factories.d.ts +283 -8
- package/dist/runtime/factories.js +1 -1
- package/dist/runtime/index.d.ts +13 -160
- package/dist/runtime/index.js +1 -1
- package/dist/testing/native.d.ts +11 -0
- package/dist/testing/native.js +1 -0
- package/dist/testing.d.ts +13 -19
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +7 -18
- package/dist/transport/index.js +1 -1
- package/dist/{types--jQzenZR.d.ts → types-BArEthJr.d.ts} +178 -10
- package/package.json +11 -2
- package/dist/DelegatingRuntimeAdapter-DE4LTGAJ.d.ts +0 -399
- package/dist/IpcRuntimeAdapter-CE0va9Tr.d.ts +0 -19
- package/dist/WasmBridge-75F6GKHG.js +0 -1
- package/dist/chunk-2L6ULC32.js +0 -1
- package/dist/chunk-2SUSPEC4.js +0 -1
- package/dist/chunk-7BJKDBLP.js +0 -2
- package/dist/chunk-DUY34MGT.js +0 -1
- package/dist/chunk-HEAJ7ZUR.js +0 -1
- package/dist/chunk-HUG5AX7R.js +0 -1
- package/dist/chunk-Q6KXVTSH.js +0 -2
- package/dist/chunk-R35AWMNY.js +0 -1
- package/dist/chunk-UILOGUOU.js +0 -1
- package/dist/chunk-WA434EWD.js +0 -2
- package/dist/chunk-XAL4T6TB.js +0 -3
- package/dist/chunk-Z2IS6NH2.js +0 -2
- package/dist/ipcFactory-32R47AVK.js +0 -1
- package/dist/openrtc-4EZPCHWM.js +0 -2
- package/dist/types-DDhMQkK8.d.ts +0 -621
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { a as PeerReconciliationStats } from '../assembly-
|
|
2
|
-
export { D as ConnectionActor, d as ConnectionActorError, e as ConnectionActorErrorKind, f as ConnectionActorKey, g as ConnectionActorOptions, h as ConnectionActorState, i as ConnectionActors, j as ConnectionClose, k as ConnectionDial, l as LogicalChannel, P as PolicySnapshot, m as PreferredTransport, n as RUNTIME_POLICY, R as RuntimeClient, o as connectionActorKey, p as connectionActorKeyString, q as getRuntimePolicy } from '../assembly-
|
|
1
|
+
import { a as PeerReconciliationStats } from '../assembly-By3UBQsE.js';
|
|
2
|
+
export { D as ConnectionActor, d as ConnectionActorError, e as ConnectionActorErrorKind, f as ConnectionActorKey, g as ConnectionActorOptions, h as ConnectionActorState, i as ConnectionActors, j as ConnectionClose, k as ConnectionDial, l as LogicalChannel, P as PolicySnapshot, m as PreferredTransport, n as RUNTIME_POLICY, R as RuntimeClient, o as connectionActorKey, p as connectionActorKeyString, q as getRuntimePolicy } from '../assembly-By3UBQsE.js';
|
|
3
3
|
import { Client as Client$1 } from '../coreClient.js';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
import { R as RuntimeCapabilities } from '../capabilities-BPuynml5.js';
|
|
10
|
-
export { B as BROWSER_CAPABILITIES, a as CapabilityHost, C as CapabilityProfile, N as NATIVE_CAPABILITIES, b as NativeRuntimeStatus, c as RuntimeAdapterKind, T as TransportStatus, d as browserCapabilities, e as capabilityProfile, f as cloneCapabilities, s as statusCapabilities } from '../capabilities-BPuynml5.js';
|
|
4
|
+
import { c as Avenue } from '../types-BArEthJr.js';
|
|
5
|
+
import { au as SignalingOptions, K as ISignalingBackend, N as RuntimeIdentity, O as RoomMember, V as SignalingEnvelope, Y as SignalingSession, Q as Device, X as DesiredPeerProjection, a9 as BackendConnectionState, ar as AppLimits, G as GrantScope, f as Connection, av as JoinRoomOptions, aw as ChannelMetadata, al as CryptoStreams, ax as RoomCreationMode, F as ClientOptions, ak as PayloadCrypto, z as DiscoveryMode, ay as ProtocolCapabilityMap, az as ScanningLoopOptions, aA as ScanningLoopHandle, aB as RuntimeBootstrapOptions, aC as RuntimeBootstrapResult, aD as ApplicationPayloadReadinessOptions, aE as ManagedApplicationRouteOptions, aF as PeerState, aG as PeerScope, aH as PeerHealth, aI as ChannelDescriptor, aJ as JoinRequest, a7 as NativeConnectParams, a8 as NativeConnectResult, as as ConnectionTarget, w as RawConnection } from '../Connection-DZ5eP5hL.js';
|
|
6
|
+
export { aK as AutoConnectPolicy, ae as BrowserProtocolStore, C as ChannelDescriptor, aL as ChannelFraming, p as ConnectionEvent, n as ConnectionState, aM as ConnectionStatus, r as DeviceConnectOptions, aN as DevicePresence, v as DeviceProfile, D as DeviceStatus, I as IncomingStream, ah as IrohDocEntry, ag as IrohMutationReceipt, J as JoinRoomOptions, L as LocalDeviceInfo, M as ManagedOptions, q as ManagedSession, af as NamespaceDescriptor, aO as PayloadRouteOptions, e as PeerConnectOptions, aP as PeerLifecycleStatus, h as PeerReadiness, aQ as PeerSessionSnapshot, k as PeerStreamOptions, a5 as PortableMediaChunk, a6 as PortableMediaControl, a3 as PortableMediaPublicationStart, a2 as PortableMediaPublish, a4 as PortableMediaSample, at as PresenceLoopOptions, aR as PresencePolicy, o as ReadinessOptions, aS as RuntimeAuthContext, ap as RuntimeAuthIdentity, y as RuntimeClientOptions, l as RuntimeDevice, i as RuntimePeerHealth, aT as RuntimePeerScope, d as RuntimePeerState, x as RuntimeRoomMember, aq as RuntimeSession, S as ScopedChannelOptions, m as ScopedLogicalChannel, aU as SessionKind, aV as SessionPlatform } from '../Connection-DZ5eP5hL.js';
|
|
7
|
+
import { R as RuntimeCapabilities } from '../capabilities-B2mHv_H7.js';
|
|
8
|
+
export { B as BROWSER_CAPABILITIES, a as CapabilityHost, C as CapabilityProfile, N as NATIVE_CAPABILITIES, b as NativeRuntimeStatus, c as RuntimeAdapterKind, T as TransportStatus, d as browserCapabilities, e as capabilityProfile, f as cloneCapabilities, s as statusCapabilities } from '../capabilities-B2mHv_H7.js';
|
|
11
9
|
export { DeviceActiveOptions, isDeviceActive, isDeviceConnectable, isDeviceRoutable } from './device-status.js';
|
|
12
|
-
export { a as IpcAdapterOptions, I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-
|
|
13
|
-
export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyIpcFailure, i as isIpcUnavailable } from '../ipc-
|
|
14
|
-
import '../DelegatingRuntimeAdapter-
|
|
10
|
+
export { a as IpcAdapterOptions, I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-Dduaxscj.js';
|
|
11
|
+
export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyIpcFailure, i as isIpcUnavailable } from '../ipc-DgzKqHH3.js';
|
|
12
|
+
import '../DelegatingRuntimeAdapter-4cgiIWMN.js';
|
|
15
13
|
|
|
16
14
|
declare class Signaling {
|
|
17
15
|
private readonly appTag;
|
|
@@ -71,142 +69,6 @@ type CapabilityRuntime = Client$1;
|
|
|
71
69
|
*/
|
|
72
70
|
declare function runtimeForCapability(handle: Avenue): CapabilityRuntime;
|
|
73
71
|
|
|
74
|
-
interface MoQSubscriberOptions {
|
|
75
|
-
maxPendingSubscriptions?: number;
|
|
76
|
-
maxSubscribeRetries?: number;
|
|
77
|
-
subscribeRetryDelayMs?: number;
|
|
78
|
-
maxBufferedGroupsPerTrack?: number;
|
|
79
|
-
maxBufferedFramesPerGroup?: number;
|
|
80
|
-
maxBufferedBytesPerTrack?: number;
|
|
81
|
-
maxObjectPayloadBytes?: number;
|
|
82
|
-
onSubscriptionTerminated?: (namespace: string, name: string, error: unknown) => void;
|
|
83
|
-
}
|
|
84
|
-
/** Draft-14 subscriber facade; session reconnect remains owned by MoQController. */
|
|
85
|
-
declare class MoQSubscriber {
|
|
86
|
-
private readonly session;
|
|
87
|
-
private readonly onObject;
|
|
88
|
-
private readonly subscriptions;
|
|
89
|
-
private readonly maxSubscriptions;
|
|
90
|
-
private readonly maxSubscribeRetries;
|
|
91
|
-
private readonly subscribeRetryDelayMs;
|
|
92
|
-
private readonly maxObjectPayloadBytes;
|
|
93
|
-
private readonly onSubscriptionTerminated?;
|
|
94
|
-
private closed;
|
|
95
|
-
constructor(session: MoQSession, onObject: (trackNamespace: string, trackName: string, object: Uint8Array, metadata: unknown) => void, options?: MoQSubscriberOptions);
|
|
96
|
-
subscribe(namespace: string, name: string): Promise<void>;
|
|
97
|
-
close(): void;
|
|
98
|
-
private consume;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
interface TransportInterface {
|
|
102
|
-
createBidirectionalStream(): Promise<{
|
|
103
|
-
readable: ReadableStream<Uint8Array>;
|
|
104
|
-
writable: WritableStream<Uint8Array>;
|
|
105
|
-
}>;
|
|
106
|
-
createUnidirectionalStream(): Promise<WritableStream<Uint8Array>>;
|
|
107
|
-
incomingBidirectionalStreams: ReadableStream<unknown>;
|
|
108
|
-
incomingUnidirectionalStreams: ReadableStream<ReadableStream<Uint8Array>>;
|
|
109
|
-
close(): void;
|
|
110
|
-
ready: Promise<void>;
|
|
111
|
-
}
|
|
112
|
-
interface MoQSessionOptions {
|
|
113
|
-
onSubscriptionTerminated?: (namespace: string, name: string, error: unknown) => void;
|
|
114
|
-
}
|
|
115
|
-
interface MoQDatagramDuplex {
|
|
116
|
-
readonly maxDatagramSize?: number;
|
|
117
|
-
readonly readable: ReadableStream<Uint8Array>;
|
|
118
|
-
readonly writable: WritableStream<Uint8Array>;
|
|
119
|
-
close(): void;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Draft-14 MoQT adapter. The OpenRTC controller owns reconnect and lifecycle;
|
|
123
|
-
* this class owns only one negotiated relay session and its protocol handles.
|
|
124
|
-
*/
|
|
125
|
-
declare class MoQSession {
|
|
126
|
-
readonly transport: TransportInterface;
|
|
127
|
-
private readonly relayUrl;
|
|
128
|
-
readonly publisher: MoQPublisher;
|
|
129
|
-
readonly subscriber: MoQSubscriber;
|
|
130
|
-
setupComplete: boolean;
|
|
131
|
-
private connection;
|
|
132
|
-
private closeListeners;
|
|
133
|
-
private closed;
|
|
134
|
-
private closeEmitted;
|
|
135
|
-
private setupResolve;
|
|
136
|
-
private readonly setupPromise;
|
|
137
|
-
constructor(transport: TransportInterface, onObject?: (ns: string, name: string, obj: Uint8Array, meta: unknown) => void, role?: number, relayUrl?: URL, options?: MoQSessionOptions);
|
|
138
|
-
requireConnection(): Draft14.Connection.Established;
|
|
139
|
-
/**
|
|
140
|
-
* Open the patched Draft 14 object-datagram surface used only by the Iroh
|
|
141
|
-
* packet carrier. Existing application-data publishing remains on subgroup
|
|
142
|
-
* streams and never shares readiness with this duplex.
|
|
143
|
-
*/
|
|
144
|
-
openDatagramDuplex(publishNamespace: string, subscribeNamespace: string, trackName: string): Promise<MoQDatagramDuplex>;
|
|
145
|
-
init(): Promise<void>;
|
|
146
|
-
waitForSetup(): Promise<void>;
|
|
147
|
-
onClose(callback: (reason?: unknown) => void): () => void;
|
|
148
|
-
close(): void;
|
|
149
|
-
private emitClose;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
interface MoQPublisherOptions {
|
|
153
|
-
maxPendingAnnounces?: number;
|
|
154
|
-
announceTimeoutMs?: number;
|
|
155
|
-
maxSubscribedTracks?: number;
|
|
156
|
-
maxActivePublishers?: number;
|
|
157
|
-
maxTrackIdChars?: number;
|
|
158
|
-
/**
|
|
159
|
-
* Reject an application object before it reaches a relay track. This must
|
|
160
|
-
* match the receiver-side default so browser and native clients apply the
|
|
161
|
-
* same hard egress boundary.
|
|
162
|
-
*/
|
|
163
|
-
maxObjectPayloadBytes?: number;
|
|
164
|
-
}
|
|
165
|
-
interface TrackPublisher {
|
|
166
|
-
close(): void;
|
|
167
|
-
push(data: Uint8Array, init: {
|
|
168
|
-
isKey: boolean;
|
|
169
|
-
timestamp: number;
|
|
170
|
-
closeAfterPush?: boolean;
|
|
171
|
-
}): Promise<void>;
|
|
172
|
-
}
|
|
173
|
-
/** Draft-14 publisher facade preserving OpenRTC's existing data-track API. */
|
|
174
|
-
declare class MoQPublisher {
|
|
175
|
-
private readonly session;
|
|
176
|
-
private readonly namespaces;
|
|
177
|
-
private readonly activePublishers;
|
|
178
|
-
private readonly maxNamespaces;
|
|
179
|
-
private readonly maxSubscribedTracks;
|
|
180
|
-
private readonly maxActivePublishers;
|
|
181
|
-
private readonly maxTrackIdChars;
|
|
182
|
-
private readonly maxObjectPayloadBytes;
|
|
183
|
-
private closed;
|
|
184
|
-
constructor(session: MoQSession, options?: MoQPublisherOptions);
|
|
185
|
-
announce(namespace: string): Promise<void>;
|
|
186
|
-
hasNamespace(namespace: string): boolean;
|
|
187
|
-
hasTrackSubscriber(namespace: string, name: string): boolean;
|
|
188
|
-
createTrack(namespace: string, name: string): Promise<TrackPublisher>;
|
|
189
|
-
close(): void;
|
|
190
|
-
private acceptTrackRequests;
|
|
191
|
-
private totalSubscriberCount;
|
|
192
|
-
private resolveTrackId;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Browser MoQ session controller.
|
|
197
|
-
*
|
|
198
|
-
* Owns the WebTransport-backed MoQ relay session, reconnect state, peer
|
|
199
|
-
* subscriptions, and direct MoQ data helpers. `Client` remains the facade so
|
|
200
|
-
* existing SDK calls and test spies keep working while MoQ stops contributing
|
|
201
|
-
* more lifecycle state to the god object.
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
type MoQBundle = {
|
|
205
|
-
session: MoQSession;
|
|
206
|
-
publisher: MoQPublisher;
|
|
207
|
-
subscriber: MoQSubscriber;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
72
|
interface RoomClientHost {
|
|
211
73
|
wasmClient: any;
|
|
212
74
|
roomCreationMode: 'client-open' | 'client-auth' | 'server-only';
|
|
@@ -251,11 +113,13 @@ type ProtocolHint = 'control' | 'explicit' | 'native-main' | 'unknown';
|
|
|
251
113
|
type IncomingStreamEvent = {
|
|
252
114
|
type: 'bi' | 'uni';
|
|
253
115
|
stream: any;
|
|
116
|
+
connectionId?: string;
|
|
254
117
|
remoteNodeId: string;
|
|
255
118
|
transportStableId?: number;
|
|
256
119
|
traceId?: string;
|
|
257
120
|
protocolHint?: ProtocolHint;
|
|
258
121
|
channel?: ChannelMetadata | null;
|
|
122
|
+
applicationAuthorized?: boolean;
|
|
259
123
|
applicationCrypto?: CryptoStreams;
|
|
260
124
|
invalid?: boolean;
|
|
261
125
|
};
|
|
@@ -318,18 +182,11 @@ declare class Client {
|
|
|
318
182
|
subscribeSessions(localDeviceId: string, callback: (session: SignalingSession) => void | Promise<void>): Promise<() => void>;
|
|
319
183
|
startScanningLoop(options: ScanningLoopOptions): Promise<ScanningLoopHandle>;
|
|
320
184
|
bootstrapRuntime(options: RuntimeBootstrapOptions): Promise<RuntimeBootstrapResult>;
|
|
321
|
-
updateTransportConfig(transports: ClientOptions['transports']): void
|
|
185
|
+
updateTransportConfig(transports: ClientOptions['transports']): Promise<void>;
|
|
322
186
|
init(): Promise<void>;
|
|
323
187
|
ensureAuthenticated(reason: 'init' | 'room-op' | 'discovery'): Promise<void>;
|
|
324
188
|
refreshRuntimeAuthToken(reason?: 'runtime-start' | 'managed-session'): Promise<void>;
|
|
325
|
-
get moqState(): string;
|
|
326
|
-
get moq(): MoQBundle | null;
|
|
327
|
-
onMoQReady(cb: () => void): () => void;
|
|
328
|
-
onMoQFailed(cb: () => void): () => void;
|
|
329
189
|
refreshTransportCapabilities(reason?: string): Promise<void>;
|
|
330
|
-
onMoQObject(callback: (ns: string, name: string, obj: Uint8Array, meta: any) => void): () => void;
|
|
331
|
-
subscribeMoQPeer(connection: Connection): void;
|
|
332
|
-
subscribeMoQPeerNode(peerId: string, subscriptionKey?: string): void;
|
|
333
190
|
connect(ticket: string, timeoutMs?: number, expectedDeviceId?: string | null, channelId?: string, options?: {
|
|
334
191
|
admissionAlreadyPresented?: boolean;
|
|
335
192
|
approvedScope?: string | null;
|
|
@@ -413,10 +270,6 @@ declare class Client {
|
|
|
413
270
|
listChannels(): ChannelDescriptor[];
|
|
414
271
|
onChannelStream(channelId: string, callback: (stream: IncomingStreamEvent) => boolean | void): () => void;
|
|
415
272
|
onRoomJoinRequest(callback: (request: JoinRequest) => void): () => void;
|
|
416
|
-
isMoQDataReady(peerId: string | null): boolean;
|
|
417
|
-
sendMoQData(peerId: string | null, data: Uint8Array, options?: {
|
|
418
|
-
alreadyProtected?: boolean;
|
|
419
|
-
}): Promise<void>;
|
|
420
273
|
}
|
|
421
274
|
|
|
422
275
|
/**
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as runtimeFromCapability}from'../chunk-
|
|
1
|
+
export{a as runtimeFromCapability}from'../chunk-2LATKLCC.js';import'../chunk-ZA44REGI.js';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-6OFAKLDB.js';import'../chunk-XEHBTMJQ.js';export{B as BROWSER_CAPABILITIES,C as NATIVE_CAPABILITIES,z as RUNTIME_POLICY,E as browserCapabilities,G as capabilityProfile,D as cloneCapabilities,A as getRuntimePolicy,m as logTeardownTrace,c as openRtcDebug,b as openRtcDebugEnabled,d as openRtcDebugInfo,e as openRtcDebugLog,F as statusCapabilities}from'../chunk-GNW63SM6.js';import'../chunk-TYZS5LXQ.js';import'../chunk-OT7IPLZE.js';import'../chunk-AJQVMVYW.js';export{a as classifyIpcFailure,b as isIpcUnavailable}from'../chunk-72NEEJQG.js';import'../chunk-WB66633N.js';import'../chunk-JPBW67B3.js';import'../chunk-MI3ZMVPK.js';import'../chunk-OWKAJPOI.js';import'../chunk-2GX6GB6L.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { O as Options, C as Client } from '../types-BArEthJr.js';
|
|
2
|
+
import { E as Endpoints } from '../protocol-BSBjMb7p.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from '../ipc-DgzKqHH3.js';
|
|
4
|
+
import '../coreClient.js';
|
|
5
|
+
import '../assembly-By3UBQsE.js';
|
|
6
|
+
import '../Connection-DZ5eP5hL.js';
|
|
7
|
+
import '../capabilities-B2mHv_H7.js';
|
|
8
|
+
|
|
9
|
+
declare function OpenRTC(options: Options, endpoints: Endpoints, bridge: PlutoIpcBridge): Client;
|
|
10
|
+
|
|
11
|
+
export { OpenRTC };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'../chunk-BOS554IK.js';import'../chunk-4MLJXEVV.js';import {b}from'../chunk-2LATKLCC.js';import'../chunk-ZA44REGI.js';import {a}from'../chunk-P2SHJMS3.js';import'../chunk-WB66633N.js';import'../chunk-JPBW67B3.js';import'../chunk-2GX6GB6L.js';function v(c,p,e){let o=new a;return b(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-4PCGKZIN.js');return a(t,e,o)}})}export{v as OpenRTC};
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ab as CoordinationGatewayGrantRequest, ac as CoordinationGatewayGrant } from './Connection-DZ5eP5hL.js';
|
|
2
|
+
import { a as AttestationProvider, b as AuthProvider, B as BotVerificationProvider, h as DeviceProfile, O as Options, C as Client } from './types-BArEthJr.js';
|
|
3
|
+
import { E as Endpoints } from './protocol-BSBjMb7p.js';
|
|
4
4
|
import './coreClient.js';
|
|
5
|
-
import './assembly-
|
|
6
|
-
import './
|
|
7
|
-
import './capabilities-BPuynml5.js';
|
|
5
|
+
import './assembly-By3UBQsE.js';
|
|
6
|
+
import './capabilities-B2mHv_H7.js';
|
|
8
7
|
|
|
9
8
|
interface DeviceProof {
|
|
10
9
|
publicKeyJwk: JsonWebKey;
|
|
@@ -21,26 +20,23 @@ interface DeviceKeyProvider {
|
|
|
21
20
|
getOrCreate(appTag: string): Promise<DeviceKey>;
|
|
22
21
|
delete?(appTag: string): Promise<void>;
|
|
23
22
|
/**
|
|
24
|
-
* Optional
|
|
25
|
-
* device certificate
|
|
26
|
-
* their same-origin
|
|
23
|
+
* Optional host-private record storage. Native hosts use this for the
|
|
24
|
+
* device certificate bound to their non-exported signing key; the host
|
|
25
|
+
* chooses a prompt-free implementation. Browsers retain their same-origin
|
|
26
|
+
* storage implementation.
|
|
27
27
|
*/
|
|
28
28
|
readSecureRecord?(appTag: string, key: string): Promise<string | null>;
|
|
29
29
|
writeSecureRecord?(appTag: string, key: string, value: string): Promise<void>;
|
|
30
30
|
deleteSecureRecord?(appTag: string, key: string): Promise<void>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
interface Endpoints {
|
|
34
|
-
controlPlane: string;
|
|
35
|
-
gateway: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
33
|
interface CredentialSource {
|
|
39
34
|
type: 'capability' | 'device-certificate';
|
|
40
35
|
token: string;
|
|
41
36
|
avenue: CoordinationGatewayGrantRequest['avenue'];
|
|
42
37
|
expiresAtMs: number;
|
|
43
|
-
|
|
38
|
+
irohRelay: boolean;
|
|
39
|
+
managedTurn: boolean;
|
|
44
40
|
renew?: () => Promise<CredentialSource>;
|
|
45
41
|
/**
|
|
46
42
|
* Re-establishes an authenticated device certificate only after the
|
|
@@ -60,7 +56,8 @@ interface CachedDeviceCertificate {
|
|
|
60
56
|
interface AuthenticatedDeviceCertificate extends CachedDeviceCertificate {
|
|
61
57
|
principalId: string;
|
|
62
58
|
enrolled: boolean;
|
|
63
|
-
|
|
59
|
+
irohRelay: boolean;
|
|
60
|
+
managedTurn: boolean;
|
|
64
61
|
}
|
|
65
62
|
interface ControlPlaneEvents {
|
|
66
63
|
beforeLogicalOperation?: (operation: string) => void;
|
|
@@ -132,8 +129,5 @@ declare function OpenRTC(options: Options, endpoints: Endpoints, testing?: {
|
|
|
132
129
|
deviceId?: string;
|
|
133
130
|
irohTestRelayUrl?: string;
|
|
134
131
|
}): Client;
|
|
135
|
-
declare namespace OpenRTC {
|
|
136
|
-
var native: (options: Options, endpoints: Endpoints, bridge: PlutoIpcBridge) => Client;
|
|
137
|
-
}
|
|
138
132
|
|
|
139
133
|
export { OpenRTC, controlPlane };
|
package/dist/testing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BCGCJGIV.js';import {c}from'./chunk-4MLJXEVV.js';import {b}from'./chunk-2LATKLCC.js';import'./chunk-ZA44REGI.js';import'./chunk-WB66633N.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function s(i){let r=e=>`${e}:${i}`;return {getOrCreate:e=>c.getOrCreate(r(e)),delete:async e=>{await c.delete?.(r(e));},readSecureRecord:(e,o)=>c.readSecureRecord?.(r(e),o)??Promise.resolve(null),writeSecureRecord:(e,o,n)=>c.writeSecureRecord?.(r(e),o,n)??Promise.resolve(),deleteSecureRecord:(e,o)=>c.deleteSecureRecord?.(r(e),o)??Promise.resolve()}}function m(i,r,e){return new a(i,r,s(e))}function u(i,r,e={}){return b(i,{endpoints:r,testingAllowInsecureLoopback:true,platform:"web",...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async o=>{let{createWasmClient:n}=await import('./runtime/factories.js');return n(o)}})}export{u as OpenRTC,m as controlPlane};
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
import { c as ProtocolName,
|
|
2
|
-
export {
|
|
1
|
+
import { c as ProtocolName, aj as RouteDescriptor, ak as PayloadCrypto, al as CryptoStreams } from '../Connection-DZ5eP5hL.js';
|
|
2
|
+
export { am as CryptoBiStream, an as RouteFamily, ao as RouteKind } from '../Connection-DZ5eP5hL.js';
|
|
3
3
|
|
|
4
4
|
declare const TRANSPORT_LABELS: readonly ProtocolName[];
|
|
5
5
|
declare function normalizeTransport(value: unknown): ProtocolName | undefined;
|
|
6
6
|
declare function isBaseIroh(value: unknown): boolean;
|
|
7
7
|
declare function isDirectIroh(value: unknown): boolean;
|
|
8
|
-
declare function isOptionalTransport(value: unknown): boolean;
|
|
9
8
|
declare function isWebRtc(value: unknown): boolean;
|
|
10
|
-
declare function isIndependent(value: unknown): boolean;
|
|
11
9
|
|
|
12
10
|
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
13
11
|
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
14
12
|
declare function listRouteDescriptors(): readonly RouteDescriptor[];
|
|
15
13
|
|
|
16
|
-
declare
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
static getProtocolCapability(name: ProtocolName): ProtocolCapability;
|
|
21
|
-
static getProtocolCapabilities(): ProtocolCapabilityMap;
|
|
22
|
-
static preferredProtocols(options?: {
|
|
23
|
-
runtime?: 'browser' | 'native' | 'any';
|
|
24
|
-
includePathLabels?: boolean;
|
|
25
|
-
}): ProtocolName[];
|
|
26
|
-
static assertProtocolAvailable(name: ProtocolName): void;
|
|
27
|
-
}
|
|
28
|
-
declare function preferredProtocols(options?: Parameters<typeof TransportFactory.preferredProtocols>[0]): ProtocolName[];
|
|
14
|
+
declare function preferredProtocols(options?: {
|
|
15
|
+
runtime?: 'browser' | 'native' | 'any';
|
|
16
|
+
includePathLabels?: boolean;
|
|
17
|
+
}): ProtocolName[];
|
|
29
18
|
|
|
30
19
|
declare function isEncryptedPayload(payload: Uint8Array): boolean;
|
|
31
20
|
declare function createSharedCrypto(key: Uint8Array, options?: {
|
|
@@ -52,4 +41,4 @@ declare function createKeyAgreement(randomBytes?: (byteLength: number) => Uint8A
|
|
|
52
41
|
declare function deriveCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
|
|
53
42
|
declare function encodeKeyAgreement(publicKey: Uint8Array): KeyAgreementPayload;
|
|
54
43
|
|
|
55
|
-
export { CryptoStreams, KEY_ALGORITHM, type KeyAgreementPayload, PUBLIC_KEY_BYTES, PayloadCrypto, ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, createCryptoStreams, createKeyAgreement, createSharedCrypto, deriveCryptoKey, encodeKeyAgreement, getRouteDescriptor, isBaseIroh, isDirectIroh, isEncryptedPayload,
|
|
44
|
+
export { CryptoStreams, KEY_ALGORITHM, type KeyAgreementPayload, PUBLIC_KEY_BYTES, PayloadCrypto, ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, createCryptoStreams, createKeyAgreement, createSharedCrypto, deriveCryptoKey, encodeKeyAgreement, getRouteDescriptor, isBaseIroh, isDirectIroh, isEncryptedPayload, isWebRtc, listRouteDescriptors, normalizeTransport, preferredProtocols };
|
package/dist/transport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{g as KEY_ALGORITHM,f as PUBLIC_KEY_BYTES,c as createCryptoStreams,h as createKeyAgreement,b as createSharedCrypto,i as deriveCryptoKey,j as encodeKeyAgreement,a as isEncryptedPayload,e as preferredProtocols}from'../chunk-TYZS5LXQ.js';export{k as TRANSPORT_LABELS,m as isBaseIroh,n as isDirectIroh,o as isWebRtc,l as normalizeTransport}from'../chunk-OT7IPLZE.js';export{b as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-OWKAJPOI.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PeerNamespace, ChannelNamespace, DiagnosticsNamespace, DeviceNamespace } from './coreClient.js';
|
|
2
|
-
import { C as ChannelDescriptor } from './
|
|
3
|
-
import { P as PlutoIrohConfiguration, a as PlutoRTCConfiguration, b as PlutoMoQConfiguration, R as RouteOptimization, c as ProtocolName } from './ITransport-CjxCQ6q7.js';
|
|
2
|
+
import { C as ChannelDescriptor, P as PlutoIrohConfiguration, a as PlutoRTCConfiguration, b as PlutoMoQConfiguration, R as RouteOptimization, c as ProtocolName } from './Connection-DZ5eP5hL.js';
|
|
4
3
|
|
|
5
4
|
interface AuthProvider {
|
|
6
5
|
/** Registered provider ID from the developer app capability manifest. */
|
|
@@ -105,7 +104,11 @@ interface UsageWarning extends UsageUpdate {
|
|
|
105
104
|
interface Transports {
|
|
106
105
|
iroh?: boolean | PlutoIrohConfiguration;
|
|
107
106
|
webrtc?: boolean | PlutoRTCConfiguration;
|
|
108
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Allow relay mechanisms. Defaults to true; set false for direct-only P2P.
|
|
109
|
+
* The authenticated runtime tracks Iroh relay and managed TURN readiness
|
|
110
|
+
* independently; this option is intent, not proof that either is deployed.
|
|
111
|
+
*/
|
|
109
112
|
relay?: boolean;
|
|
110
113
|
moq?: boolean | PlutoMoQConfiguration;
|
|
111
114
|
ble?: boolean;
|
|
@@ -117,12 +120,6 @@ interface Transports {
|
|
|
117
120
|
privacy?: 'direct' | 'relay-only';
|
|
118
121
|
/** Optimize eligible routes for stability/cost or measured latency. */
|
|
119
122
|
optimizeFor?: RouteOptimization;
|
|
120
|
-
/**
|
|
121
|
-
* Advanced native integration for hosts whose Rust process owns the
|
|
122
|
-
* application protocol registry (for example, a Tauri file-transfer host).
|
|
123
|
-
* Normal SDK consumers should leave this disabled.
|
|
124
|
-
*/
|
|
125
|
-
nativeHostProtocols?: boolean;
|
|
126
123
|
/** Exact route order. Unsupported routes are skipped, never treated as failures. */
|
|
127
124
|
priority?: readonly ProtocolName[];
|
|
128
125
|
}
|
|
@@ -143,9 +140,176 @@ interface Options {
|
|
|
143
140
|
}
|
|
144
141
|
type AccessMode = 'capability' | 'authenticated';
|
|
145
142
|
type Delivery = 'reliable' | 'latest-state';
|
|
143
|
+
interface PeerStreamOptions {
|
|
144
|
+
/** Registered application protocol used by the single incoming classifier. */
|
|
145
|
+
protocol: string;
|
|
146
|
+
timeoutMs?: number;
|
|
147
|
+
}
|
|
148
|
+
interface PeerBidirectionalStream {
|
|
149
|
+
readonly protocol: string;
|
|
150
|
+
readonly readable: ReadableStream<Uint8Array>;
|
|
151
|
+
readonly writable: WritableStream<Uint8Array>;
|
|
152
|
+
}
|
|
153
|
+
interface IncomingPeerBidirectionalStream extends PeerBidirectionalStream {
|
|
154
|
+
readonly peerId: string;
|
|
155
|
+
}
|
|
156
|
+
interface IncomingPeerUnidirectionalStream {
|
|
157
|
+
readonly peerId: string;
|
|
158
|
+
readonly protocol: string;
|
|
159
|
+
readonly readable: ReadableStream<Uint8Array>;
|
|
160
|
+
}
|
|
161
|
+
interface PeerDatagramDuplexStream {
|
|
162
|
+
readonly maxDatagramSize: number;
|
|
163
|
+
/** Drop received datagrams older than this many milliseconds; `null` disables expiry. */
|
|
164
|
+
incomingMaxAge: number | null;
|
|
165
|
+
/** Drop queued outgoing datagrams older than this many milliseconds; `null` disables expiry. */
|
|
166
|
+
outgoingMaxAge: number | null;
|
|
167
|
+
/** Bounded application receive queue. */
|
|
168
|
+
incomingMaxBufferedDatagrams: number;
|
|
169
|
+
/** Bounded application send queue. */
|
|
170
|
+
outgoingMaxBufferedDatagrams: number;
|
|
171
|
+
readonly readable: ReadableStream<Uint8Array>;
|
|
172
|
+
readonly writable: WritableStream<Uint8Array>;
|
|
173
|
+
getStats(): PeerDatagramStats;
|
|
174
|
+
}
|
|
175
|
+
interface PeerDatagramStats {
|
|
176
|
+
received: number;
|
|
177
|
+
sent: number;
|
|
178
|
+
bytesReceived: number;
|
|
179
|
+
bytesSent: number;
|
|
180
|
+
droppedIncoming: number;
|
|
181
|
+
droppedOutgoing: number;
|
|
182
|
+
expiredIncoming: number;
|
|
183
|
+
expiredOutgoing: number;
|
|
184
|
+
sendFailures: number;
|
|
185
|
+
incomingBufferedDatagrams: number;
|
|
186
|
+
outgoingBufferedDatagrams: number;
|
|
187
|
+
}
|
|
188
|
+
interface PeerStreamTransport {
|
|
189
|
+
createBidirectionalStream(options: PeerStreamOptions): Promise<PeerBidirectionalStream>;
|
|
190
|
+
createUnidirectionalStream(options: PeerStreamOptions): Promise<WritableStream<Uint8Array>>;
|
|
191
|
+
readonly incomingBidirectionalStreams: ReadableStream<IncomingPeerBidirectionalStream>;
|
|
192
|
+
readonly incomingUnidirectionalStreams: ReadableStream<IncomingPeerUnidirectionalStream>;
|
|
193
|
+
readonly datagrams: PeerDatagramDuplexStream;
|
|
194
|
+
}
|
|
195
|
+
type MediaKind = 'audio' | 'video';
|
|
196
|
+
interface MediaTrackOptions {
|
|
197
|
+
streams?: readonly MediaStream[];
|
|
198
|
+
/** Browser codec preference. Web Audio edges default to PCM; other browser audio defaults to Opus. */
|
|
199
|
+
codec?: string;
|
|
200
|
+
bitrate?: number;
|
|
201
|
+
}
|
|
202
|
+
/** Bounded local monotonic-clock samples; this is not cross-peer latency. */
|
|
203
|
+
interface MediaLatencySummary {
|
|
204
|
+
samples: number;
|
|
205
|
+
p50Ms: number;
|
|
206
|
+
p95Ms: number;
|
|
207
|
+
p99Ms: number;
|
|
208
|
+
maxMs: number;
|
|
209
|
+
}
|
|
210
|
+
interface MediaSenderStats {
|
|
211
|
+
publicationId: string;
|
|
212
|
+
mediaGeneration: number;
|
|
213
|
+
accepted: number;
|
|
214
|
+
/** Encoded chunks currently waiting on the protected logical stream. */
|
|
215
|
+
queued: number;
|
|
216
|
+
/** Encoded payload bytes currently waiting on the protected logical stream. */
|
|
217
|
+
queuedBytes: number;
|
|
218
|
+
/** Age of the oldest currently queued encoded payload. */
|
|
219
|
+
queuedAgeMs: number;
|
|
220
|
+
transmitted: number;
|
|
221
|
+
dropped: number;
|
|
222
|
+
bytes: number;
|
|
223
|
+
maxQueued: number;
|
|
224
|
+
maxQueuedBytes: number;
|
|
225
|
+
maxQueuedAgeMs: number;
|
|
226
|
+
/** Most recent asynchronous encoder or protected-stream failure, if any. */
|
|
227
|
+
lastError?: string;
|
|
228
|
+
encodeLatency: MediaLatencySummary;
|
|
229
|
+
protectedWriteLatency: MediaLatencySummary;
|
|
230
|
+
}
|
|
231
|
+
interface MediaReceiverStats {
|
|
232
|
+
publicationId: string;
|
|
233
|
+
mediaGeneration: number;
|
|
234
|
+
received: number;
|
|
235
|
+
decoded: number;
|
|
236
|
+
rendered: number;
|
|
237
|
+
dropped: number;
|
|
238
|
+
integrityFailures: number;
|
|
239
|
+
malformedFrames: number;
|
|
240
|
+
replayDrops: number;
|
|
241
|
+
/** Successful resumptions on a video keyframe after corruption or loss. */
|
|
242
|
+
videoRecoveries: number;
|
|
243
|
+
/** Whether dependent video is currently being discarded until a keyframe. */
|
|
244
|
+
awaitingKeyframe: boolean;
|
|
245
|
+
/** Longest local receive-side wait for a recovery keyframe. */
|
|
246
|
+
maxVideoRecoveryMs: number;
|
|
247
|
+
bytes: number;
|
|
248
|
+
decoderQueued: number;
|
|
249
|
+
maxDecoderQueued: number;
|
|
250
|
+
renderQueued: number;
|
|
251
|
+
maxRenderQueued: number;
|
|
252
|
+
receiveToDecodeLatency: MediaLatencySummary;
|
|
253
|
+
renderWriteLatency: MediaLatencySummary;
|
|
254
|
+
}
|
|
255
|
+
interface MediaIncomingDemuxStats {
|
|
256
|
+
/** Whether this connection's protected peer-stream channel listener is installed. */
|
|
257
|
+
registered: boolean;
|
|
258
|
+
/** Existing public peers known to this capability router. */
|
|
259
|
+
peers: number;
|
|
260
|
+
/** Rust logical connection identities bound to those peers. */
|
|
261
|
+
boundConnections: number;
|
|
262
|
+
/** Protected streams offered to this capability router. */
|
|
263
|
+
observed: number;
|
|
264
|
+
/** Streams claimed by an existing public peer and protocol handler. */
|
|
265
|
+
accepted: number;
|
|
266
|
+
/** Streams this capability correctly left for another capability router. */
|
|
267
|
+
declined: number;
|
|
268
|
+
/** Most recent identifier-free ownership decision. */
|
|
269
|
+
lastResolution: 'none' | 'connection' | 'remote-peer' | 'peer-alias' | 'unbound-connection';
|
|
270
|
+
}
|
|
271
|
+
interface MediaStats {
|
|
272
|
+
senders: readonly MediaSenderStats[];
|
|
273
|
+
receivers: readonly MediaReceiverStats[];
|
|
274
|
+
/** Bounded receiver setup/runtime failures for streams that never produced a receiver. */
|
|
275
|
+
incomingFailures: readonly string[];
|
|
276
|
+
/** Number of protected publication streams delivered by protocol dispatch. */
|
|
277
|
+
incomingProtocolStreams: number;
|
|
278
|
+
/** Transport-agnostic protected-stream ownership diagnostics. */
|
|
279
|
+
incomingDemux: MediaIncomingDemuxStats;
|
|
280
|
+
}
|
|
281
|
+
interface MediaSender {
|
|
282
|
+
readonly id: string;
|
|
283
|
+
readonly track: MediaStreamTrack | null;
|
|
284
|
+
replaceTrack(track: MediaStreamTrack | null): Promise<void>;
|
|
285
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
286
|
+
stop(): Promise<void>;
|
|
287
|
+
getStats(): Promise<MediaSenderStats>;
|
|
288
|
+
}
|
|
289
|
+
interface MediaReceiver {
|
|
290
|
+
readonly id: string;
|
|
291
|
+
readonly track: MediaStreamTrack;
|
|
292
|
+
getStats(): Promise<MediaReceiverStats>;
|
|
293
|
+
}
|
|
294
|
+
interface MediaTrackEvent {
|
|
295
|
+
readonly track: MediaStreamTrack;
|
|
296
|
+
readonly receiver: MediaReceiver;
|
|
297
|
+
readonly streams: readonly MediaStream[];
|
|
298
|
+
}
|
|
299
|
+
interface MediaConnection {
|
|
300
|
+
addTrack(track: MediaStreamTrack, options?: MediaTrackOptions): Promise<MediaSender>;
|
|
301
|
+
removeTrack(sender: MediaSender): Promise<void>;
|
|
302
|
+
onTrack(callback: (event: MediaTrackEvent) => void): () => void;
|
|
303
|
+
senders(): readonly MediaSender[];
|
|
304
|
+
receivers(): readonly MediaReceiver[];
|
|
305
|
+
getStats(): Promise<MediaStats>;
|
|
306
|
+
}
|
|
146
307
|
interface Connection {
|
|
308
|
+
/** Stable logical peer identity. It does not change when Rust replaces a physical connection or carrier. */
|
|
147
309
|
readonly id: string;
|
|
148
310
|
readonly peerId: string;
|
|
311
|
+
readonly streams: PeerStreamTransport;
|
|
312
|
+
readonly media: MediaConnection;
|
|
149
313
|
send(message: unknown): Promise<void>;
|
|
150
314
|
onMessage<T = unknown>(callback: (message: T) => void): () => void;
|
|
151
315
|
onClose(callback: () => void): () => void;
|
|
@@ -232,6 +396,8 @@ interface SpaceOptions {
|
|
|
232
396
|
interface RoomOptions {
|
|
233
397
|
access?: AccessMode;
|
|
234
398
|
membership?: 'ephemeral' | 'durable';
|
|
399
|
+
/** Use a new memory-only identity for this anonymous room client run. */
|
|
400
|
+
identity?: 'session';
|
|
235
401
|
auth?: AuthProvider;
|
|
236
402
|
maxPeers?: number;
|
|
237
403
|
/**
|
|
@@ -241,6 +407,8 @@ interface RoomOptions {
|
|
|
241
407
|
advancedFanout?: boolean;
|
|
242
408
|
}
|
|
243
409
|
interface TicketOptions {
|
|
410
|
+
/** Use a new memory-only identity for this ticket client run. */
|
|
411
|
+
identity?: 'session';
|
|
244
412
|
maxPeers?: number;
|
|
245
413
|
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
246
414
|
advancedFanout?: boolean;
|
|
@@ -292,4 +460,4 @@ interface Client {
|
|
|
292
460
|
close(): Promise<void>;
|
|
293
461
|
}
|
|
294
462
|
|
|
295
|
-
export type {
|
|
463
|
+
export type { AccessMode as A, BotVerificationProvider as B, Client as C, Delivery as D, EnrolledDevice as E, State as F, TicketOptions as G, Transports as H, IncomingPeerBidirectionalStream as I, UsageUpdate as J, UsageWarning as K, MediaConnection as M, Options as O, PeerBidirectionalStream as P, Room as R, Space as S, Ticket as T, Usage as U, AttestationProvider as a, AuthProvider as b, Avenue as c, Channel as d, Channels as e, Connection as f, DeviceOptions as g, DeviceProfile as h, Devices as i, IncomingPeerUnidirectionalStream as j, MediaIncomingDemuxStats as k, MediaKind as l, MediaLatencySummary as m, MediaReceiver as n, MediaReceiverStats as o, MediaSender as p, MediaSenderStats as q, MediaStats as r, MediaTrackEvent as s, MediaTrackOptions as t, PeerDatagramDuplexStream as u, PeerDatagramStats as v, PeerStreamOptions as w, PeerStreamTransport as x, RoomOptions as y, SpaceOptions as z };
|