rtp.js
Version:
RTP stack for Node.js and browser written in TypeScript
86 lines • 2.52 kB
TypeScript
import { RtcpPacket, type RtcpPacketDump } from './RtcpPacket';
/**
* RTCP BYE packet info dump.
*
* @category RTCP
*/
export type ByePacketDump = RtcpPacketDump & {
ssrcs: number[];
reason?: string;
};
/**
* RTCP BYE packet.
*
* ```text
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* header |V=2|P| SC | PT=BYE=203 | length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | SSRC/CSRC |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* : ... :
* +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
* (opt) | length | reason for leaving ...
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* ```
*
* @category RTCP
*
* @see
* - [RFC 3550 section 6.6](https://datatracker.ietf.org/doc/html/rfc3550#section-6.6)
*/
export declare class ByePacket extends RtcpPacket {
#private;
/**
* @param view - If given it will be parsed. Otherwise an empty RTCP BYE
* packet will be created.
*
* @throws
* - If given `view` does not contain a valid RTCP BYE packet.
*/
constructor(view?: DataView);
/**
* Dump RTCP BYE packet info.
*/
dump(): ByePacketDump;
/**
* @inheritDoc
*/
getByteLength(): number;
/**
* @inheritDoc
*/
serialize(buffer?: ArrayBufferLike, byteOffset?: number): void;
/**
* @inheritDoc
*/
clone(buffer?: ArrayBufferLike, byteOffset?: number, serializationBuffer?: ArrayBufferLike, serializationByteOffset?: number): ByePacket;
/**
* Get SSRC values.
*/
getSsrcs(): number[];
/**
* Set SSRC values.
*
* @remarks
* - Serialization is needed after calling this method.
*/
setSsrcs(ssrcs: number[]): void;
/**
* Add SSRC value.
*
* @remarks
* - Serialization is needed after calling this method.
*/
addSsrc(ssrc: number): void;
/**
* Get reason.
*/
getReason(): string | undefined;
/**
* Set reason.
*/
setReason(reason?: string): void;
}
//# sourceMappingURL=ByePacket.d.ts.map