configuration_js.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
  2. // SPDX-License-Identifier: MIT
  3. //go:build js && wasm
  4. // +build js,wasm
  5. package webrtc
  6. // Configuration defines a set of parameters to configure how the
  7. // peer-to-peer communication via PeerConnection is established or
  8. // re-established.
  9. type Configuration struct {
  10. // ICEServers defines a slice describing servers available to be used by
  11. // ICE, such as STUN and TURN servers.
  12. ICEServers []ICEServer
  13. // ICETransportPolicy indicates which candidates the ICEAgent is allowed
  14. // to use.
  15. ICETransportPolicy ICETransportPolicy
  16. // BundlePolicy indicates which media-bundling policy to use when gathering
  17. // ICE candidates.
  18. BundlePolicy BundlePolicy
  19. // RTCPMuxPolicy indicates which rtcp-mux policy to use when gathering ICE
  20. // candidates.
  21. RTCPMuxPolicy RTCPMuxPolicy
  22. // PeerIdentity sets the target peer identity for the PeerConnection.
  23. // The PeerConnection will not establish a connection to a remote peer
  24. // unless it can be successfully authenticated with the provided name.
  25. PeerIdentity string
  26. // Certificates are not supported in the JavaScript/Wasm bindings.
  27. // Certificates []Certificate
  28. // ICECandidatePoolSize describes the size of the prefetched ICE pool.
  29. ICECandidatePoolSize uint8
  30. }