Available Interceptors
Congestion Control
NACK
Request and respond to packet retransmissions
GCC
Google Congestion Control for bandwidth estimation
TWCC
Transport-wide congestion control feedback
RFC 8888
RTP Congestion Control Feedback
Quality and Reliability
FlexFEC
Forward error correction for packet recovery
Jitter Buffer
Smooth packet arrival and handle network jitter
Pacing
Control packet sending rate
Reporting and Monitoring
Reports
Generate sender and receiver reports
Statistics
Collect detailed stream statistics
Interval PLI
Request keyframes at regular intervals
Debugging
Packet Dump
Dump RTP/RTCP packets for debugging and analysis
How Interceptors Work
Interceptors sit in the RTP/RTCP processing pipeline and can:- Read incoming RTP/RTCP packets
- Write outgoing RTP/RTCP packets
- Modify packet contents
- Generate new RTCP feedback
- Buffer packets for reordering or retransmission
Interceptors are bound to streams and peer connections, allowing fine-grained control over packet processing.
Creating an Interceptor Chain
Multiple interceptors can be composed together:Configuration Options
Most interceptors support configuration through functional options:See individual interceptor pages for specific configuration options and usage examples.
Best Practices
- Order Matters: The order in which interceptors are added affects the processing pipeline
- Resource Management: Always close interceptors when done to free resources
- Logging: Use logger factories for debugging and monitoring
- Testing: Test interceptor chains with your specific use case