@urun-sh/core 0.5.4 → 0.5.6

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { ad as SessionDirectoryRequestOptions, h as AppOptions, g as App$1, ai as SessionPhase, ao as SessionStatus, ak as SessionPhaseName, A as AccessTokenOptions, a2 as RuntimeArtifact, a3 as RuntimeArtifactDownload, W as Recording, aF as TransportState, ab as Session$1, C as ChannelEndpoint, aC as TransportSession, d as ActivitySignalMode, i as AttachOptions, ac as SessionDiagnostic, b as ActivationEvent, an as SessionStatsSample, B as GenerationTick, _ as RecordingsAccessor, a4 as RuntimeArtifactsAccessor, ag as SessionEndResult, ap as SessionStream$1, ax as StreamDataTransport, af as SessionDocumentImpl, aw as StreamChunkOptions, n as ChunkReadable, Q as Presence, w as DocConnector, y as DocTokenSupplier, x as DocServerUrlResolver, a0 as RequestOptions, a1 as RequestStreamOptions, av as StoreOptions, au as Store, l as ChannelMultiplexer, ah as SessionFailureKind, J as MediaSession, P as PathHealthReporting, aB as TransportOfferResponse, aK as WtAudioLaneSeam, aL as WtAudioUplinkSeam, aS as WtVideoUplinkSeam, aR as WtDataUplinkSender, O as PathLiveness, aP as WtDataLaneSink } from './stream-data-77pUfFQK.mjs';
2
- export { c as ActivationState, j as AudioPlayoutOptions, D as DERIVED_LEG_SEP, o as DGRAM_HEADER_BYTES, s as DerivedLegRole, t as DgramHeader, v as DocConnectionState, G as GENERATION_TICK_EMIT_INTERVAL_MS, z as GENERATION_TICK_MAX_EXTRAPOLATION_MS, I as InboundStatsSample, M as MediaChunkBinding, E as MediaChunkSource, F as MediaChunkSourceFactory, H as MediaRecorderChunkSourceOptions, N as NegotiatorDataLaneSeam, K as NegotiatorOptions, R as PresenceState, S as PrewakeOptions, T as PrewakeResult, U as PrewakeStatus, V as QuicStreamDataTransport, X as RecordingBucket, Y as RecordingLifecycle, Z as RecordingStatus, $ as ReleaseSessionBeaconOptions, a5 as RuntimeAvailability, a6 as RuntimeWakeDetail, a7 as RuntimeWakeGolden, a8 as RuntimeWakeReasonCode, a9 as SIGNALING_PROTOCOL_VERSION, aa as STREAM_END, ae as SessionDocument, aj as SessionPhaseError, am as SessionStatsOptions, aq as SessionText, ar as SignalCarrier, as as Signaling, at as StartSessionOptions, ay as TransportEstablishedNotify, az as TransportNegotiator, aA as TransportOfferRequest, aE as TransportSessionSignaling, aG as VideoPlayoutOptions, aH as WT_CONTROL_FRAME_MAX, aI as WT_DATA_STREAM_VERSION, aJ as WatchGenerationTickOptions, aM as WtControlDecoder, aN as WtControlMessage, aO as WtDataEnvelope, aQ as WtDataStreamParser, aU as consumeWtDataStreams, aX as decodeStreamEnvelope, aZ as derivedLegName, a_ as derivedLegRole, a$ as encodeStreamEnvelope, b0 as encodeWtControlFrame, b1 as isPendingRecording, b2 as mediaRecorderChunkSource, b3 as parseDgramHeader, b4 as prewake, b5 as releaseSessionBeacon, b8 as watchGenerationTick, b9 as writeDgramHeader } from './stream-data-77pUfFQK.mjs';
1
+ import { ad as SessionDirectoryRequestOptions, h as AppOptions, g as App$1, ai as SessionPhase, ao as SessionStatus, ag as SessionEndResult, ak as SessionPhaseName, A as AccessTokenOptions, a2 as RuntimeArtifact, a3 as RuntimeArtifactDownload, W as Recording, aF as TransportState, ab as Session$1, C as ChannelEndpoint, aC as TransportSession, d as ActivitySignalMode, i as AttachOptions, ac as SessionDiagnostic, b as ActivationEvent, an as SessionStatsSample, B as GenerationTick, _ as RecordingsAccessor, a4 as RuntimeArtifactsAccessor, ap as SessionStream$1, ax as StreamDataTransport, af as SessionDocumentImpl, aw as StreamChunkOptions, n as ChunkReadable, Q as Presence, w as DocConnector, y as DocTokenSupplier, x as DocServerUrlResolver, a0 as RequestOptions, a1 as RequestStreamOptions, av as StoreOptions, au as Store, l as ChannelMultiplexer, ah as SessionFailureKind, J as MediaSession, P as PathHealthReporting, aB as TransportOfferResponse, aK as WtAudioLaneSeam, aL as WtAudioUplinkSeam, aS as WtVideoUplinkSeam, aR as WtDataUplinkSender, O as PathLiveness, aP as WtDataLaneSink } from './stream-data-s7maju0w.mjs';
2
+ export { c as ActivationState, j as AudioPlayoutOptions, D as DERIVED_LEG_SEP, o as DGRAM_HEADER_BYTES, s as DerivedLegRole, t as DgramHeader, v as DocConnectionState, G as GENERATION_TICK_EMIT_INTERVAL_MS, z as GENERATION_TICK_MAX_EXTRAPOLATION_MS, I as InboundStatsSample, M as MediaChunkBinding, E as MediaChunkSource, F as MediaChunkSourceFactory, H as MediaRecorderChunkSourceOptions, N as NegotiatorDataLaneSeam, K as NegotiatorOptions, R as PresenceState, S as PrewakeOptions, T as PrewakeResult, U as PrewakeStatus, V as QuicStreamDataTransport, X as RecordingBucket, Y as RecordingLifecycle, Z as RecordingStatus, $ as ReleaseSessionBeaconOptions, a5 as RuntimeAvailability, a6 as RuntimeWakeDetail, a7 as RuntimeWakeGolden, a8 as RuntimeWakeReasonCode, a9 as SIGNALING_PROTOCOL_VERSION, aa as STREAM_END, ae as SessionDocument, aj as SessionPhaseError, am as SessionStatsOptions, aq as SessionText, ar as SignalCarrier, as as Signaling, at as StartSessionOptions, ay as TransportEstablishedNotify, az as TransportNegotiator, aA as TransportOfferRequest, aE as TransportSessionSignaling, aG as VideoPlayoutOptions, aH as WT_CONTROL_FRAME_MAX, aI as WT_DATA_STREAM_VERSION, aJ as WatchGenerationTickOptions, aM as WtControlDecoder, aN as WtControlMessage, aO as WtDataEnvelope, aQ as WtDataStreamParser, aU as consumeWtDataStreams, aX as decodeStreamEnvelope, aZ as derivedLegName, a_ as derivedLegRole, a$ as encodeStreamEnvelope, b0 as encodeWtControlFrame, b1 as isPendingRecording, b2 as mediaRecorderChunkSource, b3 as parseDgramHeader, b4 as prewake, b5 as releaseSessionBeacon, b8 as watchGenerationTick, b9 as writeDgramHeader } from './stream-data-s7maju0w.mjs';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
@@ -80,6 +80,8 @@ interface CreateClientTokenOptions {
80
80
 
81
81
  dev?: boolean;
82
82
 
83
+ sharedApp?: boolean;
84
+
83
85
  fetch?: typeof fetch;
84
86
  }
85
87
 
@@ -112,6 +114,8 @@ interface PhaseObservable {
112
114
  onPhase(handler: (phase: SessionPhase) => void): () => void;
113
115
 
114
116
  readonly status?: SessionStatus;
117
+
118
+ end?(): Promise<SessionEndResult>;
115
119
  }
116
120
 
117
121
  interface WhenLiveOptions {
@@ -123,6 +127,8 @@ interface WhenLiveOptions {
123
127
 
124
128
  declare const DEFAULT_WHEN_LIVE_TIMEOUT_MS = 45000;
125
129
 
130
+ declare const COLD_BOOT_WHEN_LIVE_TIMEOUT_MS = 600000;
131
+
126
132
  declare function whenLive(session: PhaseObservable, options?: WhenLiveOptions): Promise<void>;
127
133
 
128
134
  declare function describeSessionPhase(phase: SessionPhase): string;
@@ -1108,7 +1114,7 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1108
1114
 
1109
1115
  private decoderConfig;
1110
1116
 
1111
- private decoderErrorsAt;
1117
+ private decoderErrorLogged;
1112
1118
  private writer;
1113
1119
 
1114
1120
  private dgramWriter;
@@ -1146,12 +1152,6 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1146
1152
 
1147
1153
  private hasVideoLane;
1148
1154
 
1149
- private videoArrivedEver;
1150
- private videoArrivalsInWindow;
1151
- private frameOutputEver;
1152
- private frameOutputsInWindow;
1153
- private decodeStalledMs;
1154
-
1155
1155
  readonly firstMedia: Promise<void>;
1156
1156
  constructor(offer: NonNullable<TransportOfferResponse['webtransport']>, sessionId: string, canvas: HTMLCanvasElement,
1157
1157
 
@@ -1192,8 +1192,6 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1192
1192
 
1193
1193
  private onDecoderError;
1194
1194
 
1195
- private evaluateDecodeLiveness;
1196
-
1197
1195
  private uplinkSend;
1198
1196
  private onUplinkSendError;
1199
1197
  private datagramLoop;
@@ -1286,4 +1284,4 @@ declare class FrameReassembler {
1286
1284
  private requestKeyframe;
1287
1285
  }
1288
1286
 
1289
- 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, type CreditBalance, type CreditLedgerEntry, CreditsClient, type CreditsClientOptions, CreditsError, type CreditsLedgerOptions, CreditsUnauthorizedError, 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, DocTokenSupplier, FOCUS_FIELD, FOREGROUND_COALESCE_MS, FrameReassembler, GenerationTick, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type ListOptions, type ListResult, MediaSession, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PresenceAwarenessSink, type PresenceConnectivityState, type PresenceFocus, type PresenceInteractionKind, PresenceTracker, type PresenceTrackerOptions, type PresenceTransportLike, type PresenceVisibility, 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, SessionDirectory, SessionDirectoryError, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, type SessionRetention, type SessionState, SessionStatsSample, SessionStatus, SessionStream$1 as SessionStream, type SessionSummary, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, TransportOfferResponse, TransportSessionMismatchError, TransportState, URUN_DEV_ENV, USER_ACTIVITY_FIELD, USER_ACTIVITY_MIN_INTERVAL_MS, type UserActivityPayload, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtDataLaneSink, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, createActivityTracker, createCameraWarp, createClientToken, createCreditsClient, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, fitWithin, isDurationString, isPausedPhase, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, referenceImageErrorMessage, sessionDirectory, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };
1287
+ 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, COLD_BOOT_WHEN_LIVE_TIMEOUT_MS, type CameraWarp, type CameraWarpOptions, type CameraWarpTransform, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, type CreditBalance, type CreditLedgerEntry, CreditsClient, type CreditsClientOptions, CreditsError, type CreditsLedgerOptions, CreditsUnauthorizedError, 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, DocTokenSupplier, FOCUS_FIELD, FOREGROUND_COALESCE_MS, FrameReassembler, GenerationTick, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type ListOptions, type ListResult, MediaSession, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PresenceAwarenessSink, type PresenceConnectivityState, type PresenceFocus, type PresenceInteractionKind, PresenceTracker, type PresenceTrackerOptions, type PresenceTransportLike, type PresenceVisibility, 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, SessionDirectory, SessionDirectoryError, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, type SessionRetention, type SessionState, SessionStatsSample, SessionStatus, SessionStream$1 as SessionStream, type SessionSummary, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, TransportOfferResponse, TransportSessionMismatchError, TransportState, URUN_DEV_ENV, USER_ACTIVITY_FIELD, USER_ACTIVITY_MIN_INTERVAL_MS, type UserActivityPayload, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtDataLaneSink, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, createActivityTracker, createCameraWarp, createClientToken, createCreditsClient, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, fitWithin, isDurationString, isPausedPhase, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, referenceImageErrorMessage, sessionDirectory, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ad as SessionDirectoryRequestOptions, h as AppOptions, g as App$1, ai as SessionPhase, ao as SessionStatus, ak as SessionPhaseName, A as AccessTokenOptions, a2 as RuntimeArtifact, a3 as RuntimeArtifactDownload, W as Recording, aF as TransportState, ab as Session$1, C as ChannelEndpoint, aC as TransportSession, d as ActivitySignalMode, i as AttachOptions, ac as SessionDiagnostic, b as ActivationEvent, an as SessionStatsSample, B as GenerationTick, _ as RecordingsAccessor, a4 as RuntimeArtifactsAccessor, ag as SessionEndResult, ap as SessionStream$1, ax as StreamDataTransport, af as SessionDocumentImpl, aw as StreamChunkOptions, n as ChunkReadable, Q as Presence, w as DocConnector, y as DocTokenSupplier, x as DocServerUrlResolver, a0 as RequestOptions, a1 as RequestStreamOptions, av as StoreOptions, au as Store, l as ChannelMultiplexer, ah as SessionFailureKind, J as MediaSession, P as PathHealthReporting, aB as TransportOfferResponse, aK as WtAudioLaneSeam, aL as WtAudioUplinkSeam, aS as WtVideoUplinkSeam, aR as WtDataUplinkSender, O as PathLiveness, aP as WtDataLaneSink } from './stream-data-77pUfFQK.js';
2
- export { c as ActivationState, j as AudioPlayoutOptions, D as DERIVED_LEG_SEP, o as DGRAM_HEADER_BYTES, s as DerivedLegRole, t as DgramHeader, v as DocConnectionState, G as GENERATION_TICK_EMIT_INTERVAL_MS, z as GENERATION_TICK_MAX_EXTRAPOLATION_MS, I as InboundStatsSample, M as MediaChunkBinding, E as MediaChunkSource, F as MediaChunkSourceFactory, H as MediaRecorderChunkSourceOptions, N as NegotiatorDataLaneSeam, K as NegotiatorOptions, R as PresenceState, S as PrewakeOptions, T as PrewakeResult, U as PrewakeStatus, V as QuicStreamDataTransport, X as RecordingBucket, Y as RecordingLifecycle, Z as RecordingStatus, $ as ReleaseSessionBeaconOptions, a5 as RuntimeAvailability, a6 as RuntimeWakeDetail, a7 as RuntimeWakeGolden, a8 as RuntimeWakeReasonCode, a9 as SIGNALING_PROTOCOL_VERSION, aa as STREAM_END, ae as SessionDocument, aj as SessionPhaseError, am as SessionStatsOptions, aq as SessionText, ar as SignalCarrier, as as Signaling, at as StartSessionOptions, ay as TransportEstablishedNotify, az as TransportNegotiator, aA as TransportOfferRequest, aE as TransportSessionSignaling, aG as VideoPlayoutOptions, aH as WT_CONTROL_FRAME_MAX, aI as WT_DATA_STREAM_VERSION, aJ as WatchGenerationTickOptions, aM as WtControlDecoder, aN as WtControlMessage, aO as WtDataEnvelope, aQ as WtDataStreamParser, aU as consumeWtDataStreams, aX as decodeStreamEnvelope, aZ as derivedLegName, a_ as derivedLegRole, a$ as encodeStreamEnvelope, b0 as encodeWtControlFrame, b1 as isPendingRecording, b2 as mediaRecorderChunkSource, b3 as parseDgramHeader, b4 as prewake, b5 as releaseSessionBeacon, b8 as watchGenerationTick, b9 as writeDgramHeader } from './stream-data-77pUfFQK.js';
1
+ import { ad as SessionDirectoryRequestOptions, h as AppOptions, g as App$1, ai as SessionPhase, ao as SessionStatus, ag as SessionEndResult, ak as SessionPhaseName, A as AccessTokenOptions, a2 as RuntimeArtifact, a3 as RuntimeArtifactDownload, W as Recording, aF as TransportState, ab as Session$1, C as ChannelEndpoint, aC as TransportSession, d as ActivitySignalMode, i as AttachOptions, ac as SessionDiagnostic, b as ActivationEvent, an as SessionStatsSample, B as GenerationTick, _ as RecordingsAccessor, a4 as RuntimeArtifactsAccessor, ap as SessionStream$1, ax as StreamDataTransport, af as SessionDocumentImpl, aw as StreamChunkOptions, n as ChunkReadable, Q as Presence, w as DocConnector, y as DocTokenSupplier, x as DocServerUrlResolver, a0 as RequestOptions, a1 as RequestStreamOptions, av as StoreOptions, au as Store, l as ChannelMultiplexer, ah as SessionFailureKind, J as MediaSession, P as PathHealthReporting, aB as TransportOfferResponse, aK as WtAudioLaneSeam, aL as WtAudioUplinkSeam, aS as WtVideoUplinkSeam, aR as WtDataUplinkSender, O as PathLiveness, aP as WtDataLaneSink } from './stream-data-s7maju0w.js';
2
+ export { c as ActivationState, j as AudioPlayoutOptions, D as DERIVED_LEG_SEP, o as DGRAM_HEADER_BYTES, s as DerivedLegRole, t as DgramHeader, v as DocConnectionState, G as GENERATION_TICK_EMIT_INTERVAL_MS, z as GENERATION_TICK_MAX_EXTRAPOLATION_MS, I as InboundStatsSample, M as MediaChunkBinding, E as MediaChunkSource, F as MediaChunkSourceFactory, H as MediaRecorderChunkSourceOptions, N as NegotiatorDataLaneSeam, K as NegotiatorOptions, R as PresenceState, S as PrewakeOptions, T as PrewakeResult, U as PrewakeStatus, V as QuicStreamDataTransport, X as RecordingBucket, Y as RecordingLifecycle, Z as RecordingStatus, $ as ReleaseSessionBeaconOptions, a5 as RuntimeAvailability, a6 as RuntimeWakeDetail, a7 as RuntimeWakeGolden, a8 as RuntimeWakeReasonCode, a9 as SIGNALING_PROTOCOL_VERSION, aa as STREAM_END, ae as SessionDocument, aj as SessionPhaseError, am as SessionStatsOptions, aq as SessionText, ar as SignalCarrier, as as Signaling, at as StartSessionOptions, ay as TransportEstablishedNotify, az as TransportNegotiator, aA as TransportOfferRequest, aE as TransportSessionSignaling, aG as VideoPlayoutOptions, aH as WT_CONTROL_FRAME_MAX, aI as WT_DATA_STREAM_VERSION, aJ as WatchGenerationTickOptions, aM as WtControlDecoder, aN as WtControlMessage, aO as WtDataEnvelope, aQ as WtDataStreamParser, aU as consumeWtDataStreams, aX as decodeStreamEnvelope, aZ as derivedLegName, a_ as derivedLegRole, a$ as encodeStreamEnvelope, b0 as encodeWtControlFrame, b1 as isPendingRecording, b2 as mediaRecorderChunkSource, b3 as parseDgramHeader, b4 as prewake, b5 as releaseSessionBeacon, b8 as watchGenerationTick, b9 as writeDgramHeader } from './stream-data-s7maju0w.js';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
@@ -80,6 +80,8 @@ interface CreateClientTokenOptions {
80
80
 
81
81
  dev?: boolean;
82
82
 
83
+ sharedApp?: boolean;
84
+
83
85
  fetch?: typeof fetch;
84
86
  }
85
87
 
@@ -112,6 +114,8 @@ interface PhaseObservable {
112
114
  onPhase(handler: (phase: SessionPhase) => void): () => void;
113
115
 
114
116
  readonly status?: SessionStatus;
117
+
118
+ end?(): Promise<SessionEndResult>;
115
119
  }
116
120
 
117
121
  interface WhenLiveOptions {
@@ -123,6 +127,8 @@ interface WhenLiveOptions {
123
127
 
124
128
  declare const DEFAULT_WHEN_LIVE_TIMEOUT_MS = 45000;
125
129
 
130
+ declare const COLD_BOOT_WHEN_LIVE_TIMEOUT_MS = 600000;
131
+
126
132
  declare function whenLive(session: PhaseObservable, options?: WhenLiveOptions): Promise<void>;
127
133
 
128
134
  declare function describeSessionPhase(phase: SessionPhase): string;
@@ -1108,7 +1114,7 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1108
1114
 
1109
1115
  private decoderConfig;
1110
1116
 
1111
- private decoderErrorsAt;
1117
+ private decoderErrorLogged;
1112
1118
  private writer;
1113
1119
 
1114
1120
  private dgramWriter;
@@ -1146,12 +1152,6 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1146
1152
 
1147
1153
  private hasVideoLane;
1148
1154
 
1149
- private videoArrivedEver;
1150
- private videoArrivalsInWindow;
1151
- private frameOutputEver;
1152
- private frameOutputsInWindow;
1153
- private decodeStalledMs;
1154
-
1155
1155
  readonly firstMedia: Promise<void>;
1156
1156
  constructor(offer: NonNullable<TransportOfferResponse['webtransport']>, sessionId: string, canvas: HTMLCanvasElement,
1157
1157
 
@@ -1192,8 +1192,6 @@ declare class WebTransportSession implements MediaSession, PathHealthReporting {
1192
1192
 
1193
1193
  private onDecoderError;
1194
1194
 
1195
- private evaluateDecodeLiveness;
1196
-
1197
1195
  private uplinkSend;
1198
1196
  private onUplinkSendError;
1199
1197
  private datagramLoop;
@@ -1286,4 +1284,4 @@ declare class FrameReassembler {
1286
1284
  private requestKeyframe;
1287
1285
  }
1288
1286
 
1289
- 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, type CreditBalance, type CreditLedgerEntry, CreditsClient, type CreditsClientOptions, CreditsError, type CreditsLedgerOptions, CreditsUnauthorizedError, 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, DocTokenSupplier, FOCUS_FIELD, FOREGROUND_COALESCE_MS, FrameReassembler, GenerationTick, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type ListOptions, type ListResult, MediaSession, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PresenceAwarenessSink, type PresenceConnectivityState, type PresenceFocus, type PresenceInteractionKind, PresenceTracker, type PresenceTrackerOptions, type PresenceTransportLike, type PresenceVisibility, 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, SessionDirectory, SessionDirectoryError, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, type SessionRetention, type SessionState, SessionStatsSample, SessionStatus, SessionStream$1 as SessionStream, type SessionSummary, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, TransportOfferResponse, TransportSessionMismatchError, TransportState, URUN_DEV_ENV, USER_ACTIVITY_FIELD, USER_ACTIVITY_MIN_INTERVAL_MS, type UserActivityPayload, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtDataLaneSink, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, createActivityTracker, createCameraWarp, createClientToken, createCreditsClient, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, fitWithin, isDurationString, isPausedPhase, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, referenceImageErrorMessage, sessionDirectory, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };
1287
+ 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, COLD_BOOT_WHEN_LIVE_TIMEOUT_MS, type CameraWarp, type CameraWarpOptions, type CameraWarpTransform, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, type CreditBalance, type CreditLedgerEntry, CreditsClient, type CreditsClientOptions, CreditsError, type CreditsLedgerOptions, CreditsUnauthorizedError, 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, DocTokenSupplier, FOCUS_FIELD, FOREGROUND_COALESCE_MS, FrameReassembler, GenerationTick, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type ListOptions, type ListResult, MediaSession, type NormalizeReferenceImageOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PresenceAwarenessSink, type PresenceConnectivityState, type PresenceFocus, type PresenceInteractionKind, PresenceTracker, type PresenceTrackerOptions, type PresenceTransportLike, type PresenceVisibility, 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, SessionDirectory, SessionDirectoryError, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, type SessionRetention, type SessionState, SessionStatsSample, SessionStatus, SessionStream$1 as SessionStream, type SessionSummary, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, TransportOfferResponse, TransportSessionMismatchError, TransportState, URUN_DEV_ENV, USER_ACTIVITY_FIELD, USER_ACTIVITY_MIN_INTERVAL_MS, type UserActivityPayload, VISIBILITY_FIELD, type VideoStreamOptions, WIRE_MESSAGE_BUDGET, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtDataLaneSink, activationHintFrom, cameraCaptureAvailable, captureStillFromVideo, computeBackoffDelay, createActivityTracker, createCameraWarp, createClientToken, createCreditsClient, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, fitWithin, isDurationString, isPausedPhase, isRetryableSessionError, isWakingPhase, normalizeReferenceImage, normalizeRetention, observeLeaveConfirm, observePageLifecycle, observePageTeardown, referenceImageErrorMessage, sessionDirectory, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };