@urun-sh/core 0.2.55 → 0.2.57
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/CHANGELOG.md +66 -1
- package/dist/{chunk-ROHOB3GT.mjs → chunk-GR7O2DMI.mjs} +5 -5
- package/dist/{chunk-5MCYL2CA.mjs → chunk-TZ4YVHOL.mjs} +2 -2
- package/dist/index.browser.d.mts +90 -3
- package/dist/index.browser.d.ts +90 -3
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +90 -3
- package/dist/index.d.ts +90 -3
- package/dist/index.js +5 -5
- 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.js +2 -2
- package/dist/internal.browser.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +5 -5
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-Cb0t-gV0.d.mts → stream-data-Cgh02-qs.d.mts} +87 -3
- package/dist/{stream-data-Cb0t-gV0.d.ts → stream-data-Cgh02-qs.d.ts} +87 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as AppOptions, f as App$1,
|
|
2
|
-
export { c as ActivationState, i as AudioPlayoutOptions, D as DERIVED_LEG_SEP, q as DerivedLegRole, s as DocConnectionState, M as MediaChunkBinding, v as MediaChunkSource, w as MediaChunkSourceFactory, x as MediaRecorderChunkSourceOptions, y as PresenceState, z as PrewakeOptions, B as PrewakeResult, E as PrewakeStatus, F as RecordingBucket, G as RecordingLifecycle, H as RecordingStatus,
|
|
1
|
+
import { g as AppOptions, f as App$1, a2 as SessionPhase, a8 as SessionStatus, a4 as SessionPhaseName, A as AccessTokenOptions, Q as RuntimeArtifact, S as RuntimeArtifactDownload, R as Recording, Y as Session$1, C as ChannelEndpoint, af as TransportSession, h as AttachOptions, Z as SessionDiagnostic, b as ActivationEvent, a7 as SessionStatsSample, J as RecordingsAccessor, T as RuntimeArtifactsAccessor, a0 as SessionEndResult, a9 as SessionStream$1, ae as StreamDataTransport, $ as SessionDocumentImpl, ad as StreamChunkOptions, m as ChunkReadable, P as Presence, t as DocConnector, u as DocTokenSupplier, N as RequestOptions, O as RequestStreamOptions, ac as StoreOptions, ab as Store, k as ChannelMultiplexer, a1 as SessionFailureKind, ah as TransportState } from './stream-data-Cgh02-qs.js';
|
|
2
|
+
export { c as ActivationState, i as AudioPlayoutOptions, D as DERIVED_LEG_SEP, q as DerivedLegRole, s as DocConnectionState, I as InboundStatsSample, M as MediaChunkBinding, v as MediaChunkSource, w as MediaChunkSourceFactory, x as MediaRecorderChunkSourceOptions, y as PresenceState, z as PrewakeOptions, B as PrewakeResult, E as PrewakeStatus, F as RecordingBucket, G as RecordingLifecycle, H as RecordingStatus, K as ReleaseSessionBeaconOptions, U as RuntimeAvailability, V as RuntimeWakeDetail, W as RuntimeWakeGolden, X as RuntimeWakeReasonCode, _ as SessionDocument, a3 as SessionPhaseError, a6 as SessionStatsOptions, aa as SessionText, ai as VideoPlayoutOptions, an as derivedLegName, ao as derivedLegRole, ap as isPendingRecording, aq as mediaRecorderChunkSource, ar as prewake, as as releaseSessionBeacon } from './stream-data-Cgh02-qs.js';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
5
5
|
|
|
@@ -22,9 +22,13 @@ interface CreateClientTokenOptions {
|
|
|
22
22
|
|
|
23
23
|
metadata?: Record<string, unknown>;
|
|
24
24
|
|
|
25
|
+
dev?: boolean;
|
|
26
|
+
|
|
25
27
|
fetch?: typeof fetch;
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
declare const URUN_DEV_ENV = "URUN_DEV";
|
|
31
|
+
|
|
28
32
|
interface ClientToken {
|
|
29
33
|
|
|
30
34
|
token: string;
|
|
@@ -313,6 +317,8 @@ declare class Session implements Session$1 {
|
|
|
313
317
|
|
|
314
318
|
onActivation(handler: (event: ActivationEvent) => void): () => void;
|
|
315
319
|
|
|
320
|
+
onStats(handler: (sample: SessionStatsSample) => void): () => void;
|
|
321
|
+
|
|
316
322
|
whenLive(options?: WhenLiveOptions): Promise<void>;
|
|
317
323
|
|
|
318
324
|
get recordings(): RecordingsAccessor;
|
|
@@ -786,6 +792,61 @@ interface CameraWarp {
|
|
|
786
792
|
}
|
|
787
793
|
declare function createCameraWarp(options?: CameraWarpOptions): CameraWarp;
|
|
788
794
|
|
|
795
|
+
declare const WT_DATA_STREAM_VERSION = 1;
|
|
796
|
+
|
|
797
|
+
interface WtDataEnvelope {
|
|
798
|
+
name: string;
|
|
799
|
+
payload: unknown;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
interface WtDataLaneSink {
|
|
803
|
+
onData(name: string, payload: unknown): void;
|
|
804
|
+
onLaneError(err: Error): void;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
interface QuicStreamDataTransport {
|
|
808
|
+
|
|
809
|
+
markStreamDataLaneQuic(): void;
|
|
810
|
+
|
|
811
|
+
dispatchQuicStreamData(name: string, payload: unknown): void;
|
|
812
|
+
|
|
813
|
+
quicStreamDataLaneLost(reason: string): void;
|
|
814
|
+
|
|
815
|
+
raiseQuicStreamDataError(err: Error): void;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
declare class WtDataStreamParser {
|
|
819
|
+
private buf;
|
|
820
|
+
private name;
|
|
821
|
+
private ended;
|
|
822
|
+
|
|
823
|
+
get streamName(): string | null;
|
|
824
|
+
push(chunk: Uint8Array): WtDataEnvelope[];
|
|
825
|
+
|
|
826
|
+
finish(): void;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
interface WtByteReader {
|
|
830
|
+
read(): Promise<{
|
|
831
|
+
value?: Uint8Array;
|
|
832
|
+
done: boolean;
|
|
833
|
+
}>;
|
|
834
|
+
cancel?(reason?: unknown): Promise<void>;
|
|
835
|
+
}
|
|
836
|
+
interface WtIncomingUniStream {
|
|
837
|
+
getReader(): WtByteReader;
|
|
838
|
+
}
|
|
839
|
+
interface WtIncomingUniStreams {
|
|
840
|
+
getReader(): {
|
|
841
|
+
read(): Promise<{
|
|
842
|
+
value?: WtIncomingUniStream;
|
|
843
|
+
done: boolean;
|
|
844
|
+
}>;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
declare function consumeWtDataStreams(incoming: WtIncomingUniStreams, sink: WtDataLaneSink): Promise<void>;
|
|
849
|
+
|
|
789
850
|
interface MediaSession {
|
|
790
851
|
readonly kind: 'webtransport' | 'webrtc';
|
|
791
852
|
start(): Promise<void>;
|
|
@@ -800,6 +861,8 @@ interface MediaSession {
|
|
|
800
861
|
};
|
|
801
862
|
|
|
802
863
|
readonly firstMedia: Promise<void>;
|
|
864
|
+
|
|
865
|
+
consumeDataStreams?(sink: WtDataLaneSink): void;
|
|
803
866
|
}
|
|
804
867
|
|
|
805
868
|
interface Signaling {
|
|
@@ -833,6 +896,8 @@ interface TransportOfferRequest {
|
|
|
833
896
|
webcodecs: boolean;
|
|
834
897
|
|
|
835
898
|
codecs: string[];
|
|
899
|
+
|
|
900
|
+
wtData?: boolean;
|
|
836
901
|
};
|
|
837
902
|
}
|
|
838
903
|
interface TransportOfferResponse {
|
|
@@ -848,6 +913,8 @@ interface TransportOfferResponse {
|
|
|
848
913
|
|
|
849
914
|
token: string;
|
|
850
915
|
codec: string;
|
|
916
|
+
|
|
917
|
+
data?: boolean;
|
|
851
918
|
};
|
|
852
919
|
}
|
|
853
920
|
interface TransportEstablishedNotify {
|
|
@@ -901,6 +968,16 @@ declare function parseDgramHeader(view: DataView): DgramHeader;
|
|
|
901
968
|
|
|
902
969
|
declare function writeDgramHeader(h: DgramHeader): Uint8Array;
|
|
903
970
|
|
|
971
|
+
interface NegotiatorDataLaneSeam {
|
|
972
|
+
|
|
973
|
+
onData(name: string, payload: unknown): void;
|
|
974
|
+
|
|
975
|
+
onQuicLane(): void;
|
|
976
|
+
|
|
977
|
+
onQuicLaneLost(reason: string): void;
|
|
978
|
+
|
|
979
|
+
onLaneError(err: Error): void;
|
|
980
|
+
}
|
|
904
981
|
interface NegotiatorOptions {
|
|
905
982
|
|
|
906
983
|
quicDeadlineMs?: number;
|
|
@@ -912,6 +989,8 @@ interface NegotiatorOptions {
|
|
|
912
989
|
|
|
913
990
|
createWebRtcSession: () => MediaSession;
|
|
914
991
|
createWebTransportSession?: (offer: NonNullable<TransportOfferResponse['webtransport']>) => MediaSession;
|
|
992
|
+
|
|
993
|
+
dataLane?: NegotiatorDataLaneSeam;
|
|
915
994
|
}
|
|
916
995
|
declare class TransportNegotiator {
|
|
917
996
|
private signaling;
|
|
@@ -919,12 +998,16 @@ declare class TransportNegotiator {
|
|
|
919
998
|
private opts;
|
|
920
999
|
private session;
|
|
921
1000
|
private offer;
|
|
1001
|
+
|
|
1002
|
+
private quicDataLane;
|
|
922
1003
|
constructor(signaling: Signaling, sessionId: string, opts: NegotiatorOptions);
|
|
923
1004
|
get activeTransport(): MediaSession['kind'] | null;
|
|
924
1005
|
connect(): Promise<MediaSession>;
|
|
925
1006
|
disconnect(): Promise<void>;
|
|
926
1007
|
|
|
927
1008
|
retryWebTransport(): Promise<MediaSession | null>;
|
|
1009
|
+
|
|
1010
|
+
private engageQuicDataLane;
|
|
928
1011
|
private createWebTransportSession;
|
|
929
1012
|
private startWebRtc;
|
|
930
1013
|
|
|
@@ -952,6 +1035,8 @@ declare class WebTransportSession implements MediaSession {
|
|
|
952
1035
|
private lastArrivalTs;
|
|
953
1036
|
private jitterEwmaMs;
|
|
954
1037
|
private lastStats;
|
|
1038
|
+
|
|
1039
|
+
private dataLaneSink;
|
|
955
1040
|
private firstFrameResolve;
|
|
956
1041
|
private firstFrameReject;
|
|
957
1042
|
|
|
@@ -969,6 +1054,8 @@ declare class WebTransportSession implements MediaSession {
|
|
|
969
1054
|
lossPct: number;
|
|
970
1055
|
jitterMs: number;
|
|
971
1056
|
};
|
|
1057
|
+
|
|
1058
|
+
consumeDataStreams(sink: WtDataLaneSink): void;
|
|
972
1059
|
private initDecoder;
|
|
973
1060
|
|
|
974
1061
|
private onDecoderError;
|
|
@@ -1059,4 +1146,4 @@ declare class FrameReassembler {
|
|
|
1059
1146
|
private requestKeyframe;
|
|
1060
1147
|
}
|
|
1061
1148
|
|
|
1062
|
-
export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CameraWarp, type CameraWarpOptions, type CameraWarpTransform, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DATA_CHANNEL_MESSAGE_CEILING, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_REFERENCE_JPEG_QUALITY, DEFAULT_REFERENCE_MAX_SIZE, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, DocTokenSupplier, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorOptions, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, ProduceAckTimeoutError, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, type ReferenceImage, type ReferenceImageSource, type ReferenceImageType, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionMismatchError, TransportSessionSignaling, TransportState, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WT_CONTROL_FRAME_MAX, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, createActivityTracker, createCameraWarp, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, fitWithin, isDurationString, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, parseDgramHeader, referenceImageErrorMessage, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };
|
|
1149
|
+
export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CameraWarp, type CameraWarpOptions, type CameraWarpTransform, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DATA_CHANNEL_MESSAGE_CEILING, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_REFERENCE_JPEG_QUALITY, DEFAULT_REFERENCE_MAX_SIZE, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, DocTokenSupplier, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorDataLaneSeam, type NegotiatorOptions, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, ProduceAckTimeoutError, type QuicStreamDataTransport, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, type ReferenceImage, type ReferenceImageSource, type ReferenceImageType, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatsSample, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionMismatchError, TransportSessionSignaling, TransportState, URUN_DEV_ENV, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WT_CONTROL_FRAME_MAX, WT_DATA_STREAM_VERSION, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, type WtDataEnvelope, type WtDataLaneSink, WtDataStreamParser, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, consumeWtDataStreams, createActivityTracker, createCameraWarp, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, fitWithin, isDurationString, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, parseDgramHeader, referenceImageErrorMessage, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };
|