Document the "empty defaults" behaviour of NewAPI

By default the API object has no Codecs or Interceptors enabled.
This commit is contained in:
forest
2023-07-23 22:25:56 -05:00
committed by Sean DuBois
parent 898fdd6f6c
commit 6b22634c1d

4
api.go
View File

@@ -25,6 +25,10 @@ type API struct {
}
// NewAPI Creates a new API object for keeping semi-global settings to WebRTC objects
//
// WARNING: No Codecs or Interceptors are enabled by default. Unless configured properly a
// PeerConnection will not be able to transmit media. For an example of how to do that,
// see the body of the webrtc.NewPeerConnection() function.
func NewAPI(options ...func(*API)) *API {
a := &API{
interceptor: &interceptor.NoOp{},