File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -89,24 +89,13 @@ type PeerConnection struct {
89
89
interceptorRTCPWriter interceptor.RTCPWriter
90
90
}
91
91
92
- // NewPeerConnection creates a PeerConnection with the default codecs and
93
- // interceptors. See RegisterDefaultCodecs and RegisterDefaultInterceptors.
92
+ // NewPeerConnection creates a PeerConnection with the default codecs and interceptors.
94
93
//
95
- // If you wish to customize the set of available codecs or the set of
96
- // active interceptors, create a MediaEngine and call api.NewPeerConnection
97
- // instead of this function.
94
+ // If you wish to customize the set of available codecs and/ or the set of active interceptors,
95
+ // create an API with a custom MediaEngine and/or interceptor.Registry,
96
+ // then call API.NewPeerConnection() instead of this function.
98
97
func NewPeerConnection (configuration Configuration ) (* PeerConnection , error ) {
99
- m := & MediaEngine {}
100
- if err := m .RegisterDefaultCodecs (); err != nil {
101
- return nil , err
102
- }
103
-
104
- i := & interceptor.Registry {}
105
- if err := RegisterDefaultInterceptors (m , i ); err != nil {
106
- return nil , err
107
- }
108
-
109
- api := NewAPI (WithMediaEngine (m ), WithInterceptorRegistry (i ))
98
+ api := NewAPI ()
110
99
return api .NewPeerConnection (configuration )
111
100
}
112
101
You can’t perform that action at this time.
0 commit comments