configuration_js.go 1.2 KB

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