Factory interface provides a standardized way to construct interceptor instances with a unique identifier.
Interface Definition
Methods
NewInterceptor
Unique identifier for the interceptor instance (typically a PeerConnection ID)
Interceptor- The newly created interceptor instanceerror- Any error that occurred during construction
Usage Example
Implementation Example
Built-in Factory Implementations
The following packages provide factory implementations:- NACK:
GeneratorInterceptorFactory,ResponderInterceptorFactory - Report:
ReceiverInterceptorFactory,SenderInterceptorFactory - Stats:
InterceptorFactory - TWCC:
SenderInterceptorFactory,HeaderExtensionInterceptorFactory - GCC: Uses
BandwidthEstimatorFactoryfor creating bandwidth estimators - JitterBuffer:
InterceptorFactory - FlexFEC:
FecInterceptorFactory - Interval PLI:
ReceiverInterceptorFactory - PacketDump:
ReceiverInterceptorFactory,SenderInterceptorFactory - RFC8888:
SenderInterceptorFactory - RTPFB:
InterceptorFactory - Pacing:
InterceptorFactory - CC:
InterceptorFactory
See Also
- Interceptor - The core interface that factories create
- Registry - Collector for multiple interceptor factories
- Chain - Combining multiple interceptors