Readonly
typeThe key/type identifier for this pair.
Readonly
valueThe value for this pair.
typeValue
is even: a varint (bigint
).typeValue
is odd: a binary blob (Uint8Array
).Checks if this pair is equal to another.
The other KeyValuePair.
True if both type and value are equal.
Serializes this key-value pair to a frozen byte buffer.
The serialized buffer.
Static
deserializeDeserializes a KeyValuePair from a buffer.
The buffer to read from.
The deserialized KeyValuePair.
Static
tryCreates a new blob KeyValuePair.
Must be odd.
The binary blob value.
A KeyValuePair with blob value.
Static
tryCreates a new varint KeyValuePair.
Must be even.
The varint value.
A KeyValuePair with varint value.
Represents a key-value pair for MOQT protocol parameters.
typeValue
is even, the value is a varint (bigint
).typeValue
is odd, the value is a binary blob (Uint8Array
) with a maximum length of 65535 bytes.Use KeyValuePair.tryNewVarInt for varint pairs and KeyValuePair.tryNewBytes for blob pairs.