import { K as KeyValuePair } from '../byte_buffer-BOK6VPTF.js'; export { B as BaseByteBuffer, a as ByteBuffer, D as DatagramObject, h as DatagramStatus, e as FetchHeaderType, j as FetchObject, F as FrozenByteBuffer, m as FullTrackName, L as Location, l as MAX_FULL_TRACK_NAME_LENGTH, k as MAX_NAMESPACE_TUPLE_COUNT, M as MAX_REASON_PHRASE_LEN, n as MoqtObject, O as ObjectDatagramStatusType, d as ObjectDatagramType, f as ObjectForwardingPreference, g as ObjectStatus, R as ReasonPhrase, S as SubgroupHeaderType, o as SubgroupObject, c as Tuple, T as TupleField, b as isBytes, i as isVarInt } from '../byte_buffer-BOK6VPTF.js'; export { ah as AuthTokenVariant, ai as AuthorizationToken, C as ClientSetup, a9 as CommonType, w as ControlMessage, d as ControlMessageType, D as DRAFT_14, am as DeliveryTimeout, x as Fetch, y as FetchCancel, z as FetchError, l as FetchErrorCode, a0 as FetchHeader, A as FetchOk, h as FetchType, F as FilterType, B as GoAway, G as GroupOrder, a3 as Header, al as MaxAuthTokenCacheSize, an as MaxCacheDuration, M as MaxRequestId, aj as MaxRequestIdParameter, a8 as Parameter, ak as Path, L as Publish, K as PublishDone, q as PublishDoneStatusCode, N as PublishError, u as PublishErrorCode, P as PublishNamespace, c as PublishNamespaceCancel, Z as PublishNamespaceDone, a as PublishNamespaceError, f as PublishNamespaceErrorCode, b as PublishNamespaceOk, O as PublishOk, a2 as RequestIdMap, R as RequestsBlocked, E as ServerSetup, a4 as SetupParameter, ab as SetupParameterType, a5 as SetupParameters, a1 as SubgroupHeader, S as Subscribe, Q as SubscribeError, k as SubscribeErrorCode, H as SubscribeNamespace, I as SubscribeNamespaceError, n as SubscribeNamespaceErrorCode, J as SubscribeNamespaceOk, U as SubscribeOk, V as SubscribeUpdate, af as TokenAliasType, W as TrackStatus, T as TrackStatusCode, X as TrackStatusError, Y as TrackStatusOk, _ as Unsubscribe, $ as UnsubscribeNamespace, a6 as VersionSpecificParameter, ad as VersionSpecificParameterType, a7 as VersionSpecificParameters, aa as commonTypeFromNumber, e as controlMessageTypeFromBigInt, m as fetchErrorCodeFromBigInt, i as fetchTypeFromBigInt, g as filterTypeFromBigInt, j as groupOrderFromNumber, r as publishDoneStatusCodeFromBigInt, v as publishErrorCodeFromBigInt, p as publishNamespaceErrorCodeFromBigInt, ac as setupParameterTypeFromNumber, s as subscribeErrorCodeFromBigInt, o as subscribeNamespaceErrorCodeFromBigInt, ag as tokenAliasTypeFromNumber, t as trackStatusCodeFromBigInt, ae as versionSpecificParameterTypeFromNumber } from '../version_parameter-B9sjihEd.js'; /** * 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 enum LOCHeaderExtensionId { CaptureTimestamp = 2, VideoFrameMarking = 4, AudioLevel = 6, VideoConfig = 13 } declare function locHeaderExtensionIdFromNumber(value: number): LOCHeaderExtensionId; /** * 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[]; } export { AudioLevel, CaptureTimestamp, CastingError, ExtensionHeader, ExtensionHeaders, InternalError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCHeaderExtensionId, LengthExceedsMaxError, MOQtailError, NotEnoughBytesError, ProtocolViolationError, RequestIdError, TerminationCode, TerminationError, TimeoutError, TrackNameError, VarIntOverflowError, VideoConfig, VideoFrameMarking, locHeaderExtensionIdFromNumber };