libp2p
    Preparing search index...

    Interface WebRTCTransportDirectInit

    interface WebRTCTransportDirectInit {
        certificate?: TransportCertificate;
        certificateDatastoreKey?: string;
        certificateKeychainName?: string;
        certificateLifespan?: number;
        certificateRenewalThreshold?: number;
        certificates?: TransportCertificate[];
        dataChannel?: DataChannelOptions;
        rtcConfiguration?:
            | RTCConfiguration
            | (() => RTCConfiguration | Promise<RTCConfiguration>);
        useLibjuice?: boolean;
    }
    Index

    Properties

    certificate?: TransportCertificate

    Use an existing TLS certificate to secure incoming connections or supply settings to generate one.

    This must be an ECDSA certificate using the P-256 curve.

    From our testing we find that P-256 elliptic curve is supported by Pion, webrtc-rs, as well as Chromium (P-228 and P-384 was not supported in Chromium).

    certificateDatastoreKey?: string

    The key the certificate is stored in the datastore under

    '/libp2p/webrtc-direct/certificate'
    
    certificateKeychainName?: string

    The name the certificate private key is stored in the keychain with

    'webrtc-direct-certificate-private-key'
    
    certificateLifespan?: number

    Number of ms a certificate should be valid for (defaults to 14 days)

    2_592_000_000
    
    certificateRenewalThreshold?: number

    Certificates will be renewed this many ms before expiry (defaults to 1 day)

    86_400_000
    
    certificates?: TransportCertificate[]

    use certificate instead - this option will be removed in a future release

    dataChannel?: DataChannelOptions

    The default configuration used by all created RTCDataChannels

    rtcConfiguration?:
        | RTCConfiguration
        | (() => RTCConfiguration | Promise<RTCConfiguration>)

    The default configuration used by all created RTCPeerConnections

    useLibjuice?: boolean

    this setting is ignored and will be removed in a future release