Skip to content

Commit

Permalink
Document the "empty defaults" behaviour of NewAPI
Browse files Browse the repository at this point in the history
By default the API object has no Codecs or Interceptors enabled.
  • Loading branch information
ForestJohnson authored and Sean-Der committed Sep 11, 2023
1 parent 898fdd6 commit 6b22634
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down

0 comments on commit 6b22634

Please sign in to comment.