github.com/pion/webrtc/v4@v4.0.1/configuration_js.go (about)

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