rtp.js
Version:
RTP stack for Node.js and browser written in TypeScript
42 lines • 1.19 kB
TypeScript
import { Serializable, type SerializableDump } from './Serializable';
export declare const RTP_VERSION = 2;
/**
* Packet info dump.
*
* @remarks
* - Read the info dump type of each RTP and RTCP packet instead.
*/
export type PacketDump = SerializableDump & {
padding: number;
};
/**
* Parent class of all RTP and RTCP packets.
*/
export declare abstract class Packet extends Serializable {
protected padding: number;
protected constructor(view?: DataView);
/**
* Base RTCP packet dump.
*
* @remarks
* - Read the info dump type of each RTCP packet instead.
*/
dump(): PacketDump;
/**
* Get the padding (in bytes) at the end of the packet.
*/
getPadding(): number;
/**
* Pad the packet total length to 4 bytes. To achieve it, this method may add
* or remove bytes of padding.
*
* @remarks
* - Serialization maybe needed after calling this method.
*/
padTo4Bytes(): void;
protected setVersion(): void;
protected hasPaddingBit(): boolean;
protected setPaddingBit(flag: boolean): void;
protected setPadding(padding: number): void;
}
//# sourceMappingURL=Packet.d.ts.map