Versions in this module Expand all Collapse all v1 v1.52.1 Sep 24, 2026 v1.52.0 Sep 18, 2026 Changes in this version + var ErrBufferSizeInsufficient = errors.New("data track packet buffer size insufficient") + var ErrExtensionNotFound = errors.New("data track packet extension not found") + var ErrExtensionSizeInsufficient = errors.New("data track packet extension size insufficient") + var ErrExtensionSizeTooBig = errors.New("extension size is too big") + var ErrHeaderSizeInsufficient = errors.New("data track packet header size insufficient") + type Extension struct + func NewExtension(id uint8, data []byte) Extension + func (e Extension) Data() []byte + func (e Extension) ID() uint8 + type ExtensionParticipantSid struct + func NewExtensionParticipantSid(participantID livekit.ParticipantID) (*ExtensionParticipantSid, error) + func (e *ExtensionParticipantSid) Marshal() (Extension, error) + func (e *ExtensionParticipantSid) ParticipantID() livekit.ParticipantID + func (e *ExtensionParticipantSid) Unmarshal(ext Extension) error + type Header struct + Extensions []Extension + ExtensionsSize uint16 + FrameNumber uint16 + Handle uint16 + HasExtensions bool + IsFinalOfFrame bool + IsStartOfFrame bool + SequenceNumber uint16 + Timestamp uint32 + Version uint8 + func (h *Header) AddExtension(ext Extension) + func (h *Header) GetExtension(id uint8) (Extension, error) + func (h *Header) MarshalSize() int + func (h *Header) MarshalTo(buf []byte) (int, error) + func (h *Header) Unmarshal(buf []byte) (int, error) + type Packet struct + Payload []byte + func (p *Packet) Marshal() ([]byte, error) + func (p *Packet) MarshalTo(buf []byte) error + func (p *Packet) Unmarshal(buf []byte) error