diff --git a/interceptor.go b/interceptor.go index abe7116f..d76793b9 100644 --- a/interceptor.go +++ b/interceptor.go @@ -10,8 +10,9 @@ import ( "github.com/pion/rtp" ) -// RegisterDefaultInterceptors will register some useful interceptors. If you want to customize which interceptors are loaded, -// you should copy the code from this method and remove unwanted interceptors. +// RegisterDefaultInterceptors will register some useful interceptors. +// If you want to customize which interceptors are loaded, you should copy the +// code from this method and remove unwanted interceptors. func RegisterDefaultInterceptors(mediaEngine *MediaEngine, interceptorRegistry *interceptor.Registry) error { if err := ConfigureNack(mediaEngine, interceptorRegistry); err != nil { return err diff --git a/peerconnection.go b/peerconnection.go index 871a784d..30264cd9 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -81,8 +81,12 @@ type PeerConnection struct { interceptorRTCPWriter interceptor.RTCPWriter } -// NewPeerConnection creates a peerconnection with the default -// codecs. See API.NewPeerConnection for details. +// NewPeerConnection creates a PeerConnection with the default codecs and +// interceptors. See RegisterDefaultCodecs and RegisterDefaultInterceptors. +// +// If you wish to customize the set of available codecs or the set of +// active interceptors, create a MediaEngine and call api.NewPeerConnection +// instead of this function. func NewPeerConnection(configuration Configuration) (*PeerConnection, error) { m := &MediaEngine{} if err := m.RegisterDefaultCodecs(); err != nil {