import { u as FullTrackName, K as KeyValuePair, t as FrozenByteBuffer, B as BaseByteBuffer, L as LOCHeaderExtensionId, av as TrackExtensionType, b as ByteBuffer } from './setup_parameter-BgNrJRDS.cjs'; export { A as AuthTokenVariant, a as AuthorizationToken, C as ClientSetup, c as ControlMessage, d as ControlMessageType, D as Datagram, e as DefaultPublisherGroupOrderExtension, f as DefaultPublisherPriorityExtension, g as DeliveryTimeout, h as DeliveryTimeoutExtension, i as DynamicGroupsExtension, E as EndOfRangeKind, j as Expires, F as Fetch, k as FetchCancel, l as FetchHeader, m as FetchHeaderType, n as FetchObject, o as FetchObjectContext, p as FetchOk, q as FetchType, r as FilterType, s as Forward, G as GoAway, v as GroupOrder, w as GroupOrderParam, H as Header, I as ImmutableExtensionsExtension, x as LargestObject, y as Location, M as MAX_FULL_TRACK_NAME_LENGTH, z as MAX_NAMESPACE_TUPLE_COUNT, J as MAX_REASON_PHRASE_LEN, N as MaxAuthTokenCacheSize, O as MaxCacheDurationExtension, P as MaxRequestId, Q as MaxRequestIdParameter, R as MessageParameter, S as MessageParameterType, T as MessageParameters, U as MoqtObject, V as Namespace, W as NamespaceDone, X as NamespaceSubscribeOptions, Y as NewGroupRequest, Z as ObjectDatagramType, _ as ObjectForwardingPreference, $ as ObjectStatus, a0 as Parameter, a1 as Path, a2 as Publish, a3 as PublishDone, a4 as PublishDoneStatusCode, a5 as PublishNamespace, a6 as PublishNamespaceCancel, a7 as PublishNamespaceDone, a8 as PublishOk, a9 as ReasonPhrase, aa as RequestError, ab as RequestErrorCode, ac as RequestIdMap, ad as RequestOk, ae as RequestUpdate, af as RequestsBlocked, ag as SUPPORTED_VERSIONS, ah as ServerSetup, ai as SetupParameter, aj as SetupParameterType, ak as SetupParameters, al as SubgroupHeader, am as SubgroupHeaderType, an as SubgroupObject, ao as Subscribe, ap as SubscribeNamespace, aq as SubscribeOk, ar as SubscriberPriority, as as SubscriptionFilter, at as TokenAliasType, au as TrackExtension, aw as TrackStatus, ax as TrackStatusCode, ay as Tuple, az as TupleField, aA as UnknownTrackExtension, aB as Unsubscribe, aC as UnsubscribeNamespace, aD as applyMessageParameterUpdate, aE as controlMessageTypeFromBigInt, aF as deserializeKvpList, aG as deserializeKvpListUntilEmpty, aH as fetchTypeFromBigInt, aI as filterTypeFromBigInt, aJ as groupOrderFromNumber, aK as isBytes, aL as isVarInt, aM as locHeaderExtensionIdFromNumber, aN as messageParameterTypeFromNumber, aO as publishDoneStatusCodeFromBigInt, aP as requestErrorCodeFromBigInt, aQ as serializeKvpList, aR as setupParameterTypeFromNumber, aS as tokenAliasTypeFromNumber, aT as trackStatusCodeFromBigInt } from './setup_parameter-BgNrJRDS.cjs'; /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class Switch { requestId: bigint; fullTrackName: FullTrackName; subscriptionRequestId: bigint; parameters: KeyValuePair[]; constructor(requestId: bigint, fullTrackName: FullTrackName, subscriptionRequestId: bigint, parameters: KeyValuePair[]); serialize(): FrozenByteBuffer; static parsePayload(buf: BaseByteBuffer): Switch; } /** * Copyright 2026 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ interface CMSFTrack { name: string; packaging: 'cmaf' | 'chunk-per-object' | 'timeline'; codec?: string; role: 'video' | 'audio' | 'timeline'; depends?: string[]; mimeType?: string; width?: number; height?: number; timescale?: number; bitrate?: number; initData?: string; } interface CMSF { version: number; tracks: CMSFTrack[]; } declare class CMSFCatalog { #private; private constructor(); static from(payload: ArrayBufferLike): CMSFCatalog; getByTrackName(trackName: string): CMSFTrack | undefined; getTracks(role?: CMSF['tracks'][number]['role']): CMSFTrack[]; getVideo(index?: number): CMSFTrack | undefined; getAudio(index?: number): CMSFTrack | undefined; getTimeline(index?: number): CMSFTrack | undefined; getCodecString(trackName: string): string | undefined; getRole(trackName: string): "timeline" | "video" | "audio" | undefined; getPackaging(trackName: string): "cmaf" | "chunk-per-object" | "timeline" | undefined; isCMAF(trackName: string): boolean; getTimescale(trackName: string): number | undefined; getInitData(trackName: string): Uint8Array | undefined; private extractTrackName; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Base class for all MOQtail errors. */ declare class MOQtailError extends Error { constructor(cause?: string); } /** * Not enough bytes in buffer to satisfy a read. */ declare class NotEnoughBytesError extends MOQtailError { context: string; needed: number; available: number; constructor(context: string, needed: number, available: number); } /** * Cannot cast between two incompatible types. */ declare class CastingError extends MOQtailError { context: string; fromType: string; toType: string; details: string; constructor(context: string, fromType: string, toType: string, details: string); } /** * Value too large to encode as varint. */ declare class VarIntOverflowError extends MOQtailError { context: string; value: number; constructor(context: string, value: number); } /** * Length exceeds maximum allowed by protocol. */ declare class LengthExceedsMaxError extends MOQtailError { context: string; max: number; len: number; constructor(context: string, max: number, len: number); } /** * Key/value formatting error. */ declare class KeyValueFormattingError extends MOQtailError { context: string; constructor(context: string); } /** * Invalid discriminant or type tag. */ declare class InvalidTypeError extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Invalid UTF-8 encountered in a string or bytes field. */ declare class InvalidUTF8Error extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Generic protocol violation. */ declare class ProtocolViolationError extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Track naming error. */ declare class TrackNameError extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Request ID error. */ declare class RequestIdError extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Operation timed out. */ declare class TimeoutError extends MOQtailError { context: string; constructor(context: string); } /** * Internal error. */ declare class InternalError extends MOQtailError { context: string; details: string; constructor(context: string, details: string); } /** * Connection terminated. */ declare class TerminationError extends MOQtailError { context: string; terminationCode: number; constructor(context: string, terminationCode: number); } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare enum TerminationCode { NO_ERROR = 0, INTERNAL_ERROR = 1, UNAUTHORIZED = 2, PROTOCOL_VIOLATION = 3, INVALID_REQUEST_ID = 4, DUPLICATE_TRACK_ALIAS = 5, KEY_VALUE_FORMATTING_ERROR = 6, TOO_MANY_REQUESTS = 7, INVALID_PATH = 8, MALFORMED_PATH = 9, GOAWAY_TIMEOUT = 16, CONTROL_MESSAGE_TIMEOUT = 17, DATA_STREAM_TIMEOUT = 18, AUTH_TOKEN_CACHE_OVERFLOW = 19, DUPLICATE_AUTH_TOKEN_ALIAS = 20, VERSION_NEGOTIATION_FAILED = 21, MALFORMED_AUTH_TOKEN = 22, UNKNOWN_AUTH_TOKEN_ALIAS = 23, EXPIRED_AUTH_TOKEN = 24, INVALID_AUTHORITY = 25, MALFORMED_AUTHORITY = 26 } declare namespace TerminationCode { /** * Tries to convert a number to a TerminationCode enum member. * * @param code - The numeric code to convert. * @returns The corresponding TerminationCode member, or throws InvalidTypeError if the code is not valid. */ function tryFrom(code: number): TerminationCode; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class CaptureTimestamp { readonly timestamp: bigint; static readonly TYPE = LOCHeaderExtensionId.CaptureTimestamp; constructor(timestamp: bigint); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): CaptureTimestamp | undefined; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class VideoFrameMarking { readonly value: bigint; static readonly TYPE = LOCHeaderExtensionId.VideoFrameMarking; constructor(value: bigint); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): VideoFrameMarking | undefined; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class AudioLevel { readonly audioLevel: bigint; static readonly TYPE = LOCHeaderExtensionId.AudioLevel; constructor(audioLevel: bigint); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): AudioLevel | undefined; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class VideoConfig { readonly config: Uint8Array; static readonly TYPE = LOCHeaderExtensionId.VideoConfig; constructor(config: Uint8Array); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): VideoConfig | undefined; } /** * Copyright 2025 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ type ExtensionHeader = CaptureTimestamp | VideoFrameMarking | AudioLevel | VideoConfig; declare namespace ExtensionHeader { function fromKeyValuePair(pair: KeyValuePair): ExtensionHeader | undefined; function toKeyValuePair(header: ExtensionHeader): KeyValuePair; function isCaptureTimestamp(header: ExtensionHeader): header is CaptureTimestamp; function isVideoFrameMarking(header: ExtensionHeader): header is VideoFrameMarking; function isAudioLevel(header: ExtensionHeader): header is AudioLevel; function isVideoConfig(header: ExtensionHeader): header is VideoConfig; } declare class ExtensionHeaders { private kvps; addCaptureTimestamp(timestamp: bigint | number): this; addVideoFrameMarking(marking: bigint | number): this; addAudioLevel(audioLevel: bigint | number): this; addVideoConfig(config: Uint8Array): this; addRaw(pair: KeyValuePair): this; build(): KeyValuePair[]; static fromKeyValuePairs(kvps: KeyValuePair[]): ExtensionHeader[]; } /** * Copyright 2026 The MOQtail Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare class ImmutableExtensionsObjectExtension { readonly extensions: KeyValuePair[]; static readonly TYPE = TrackExtensionType.ImmutableExtensions; constructor(extensions: KeyValuePair[]); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): ImmutableExtensionsObjectExtension | undefined; } declare class PriorGroupIdGapExtension { readonly gap: bigint; static readonly TYPE = TrackExtensionType.PriorGroupIdGap; constructor(gap: bigint); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): PriorGroupIdGapExtension | undefined; } declare class PriorObjectIdGapExtension { readonly gap: bigint; static readonly TYPE = TrackExtensionType.PriorObjectIdGap; constructor(gap: bigint); toKeyValuePair(): KeyValuePair; static fromKeyValuePair(pair: KeyValuePair): PriorObjectIdGapExtension | undefined; } declare class UnknownObjectExtension { readonly kvp: KeyValuePair; constructor(kvp: KeyValuePair); toKeyValuePair(): KeyValuePair; } type ObjectExtension = ImmutableExtensionsObjectExtension | PriorGroupIdGapExtension | PriorObjectIdGapExtension | UnknownObjectExtension; declare namespace ObjectExtension { function fromKeyValuePair(pair: KeyValuePair): ObjectExtension; function toKeyValuePair(ext: ObjectExtension): KeyValuePair; function deserializeAll(buf: BaseByteBuffer): ObjectExtension[]; function serializeInto(exts: ObjectExtension[], payload: ByteBuffer): void; function isImmutableExtensions(ext: ObjectExtension): ext is ImmutableExtensionsObjectExtension; function isPriorGroupIdGap(ext: ObjectExtension): ext is PriorGroupIdGapExtension; function isPriorObjectIdGap(ext: ObjectExtension): ext is PriorObjectIdGapExtension; function isUnknown(ext: ObjectExtension): ext is UnknownObjectExtension; } export { AudioLevel, BaseByteBuffer, ByteBuffer, type CMSF, CMSFCatalog, type CMSFTrack, CaptureTimestamp, CastingError, ExtensionHeader, ExtensionHeaders, FrozenByteBuffer, FullTrackName, ImmutableExtensionsObjectExtension, InternalError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCHeaderExtensionId, LengthExceedsMaxError, MOQtailError, NotEnoughBytesError, ObjectExtension, PriorGroupIdGapExtension, PriorObjectIdGapExtension, ProtocolViolationError, RequestIdError, Switch, TerminationCode, TerminationError, TimeoutError, TrackExtensionType, TrackNameError, UnknownObjectExtension, VarIntOverflowError, VideoConfig, VideoFrameMarking };