peerix - v0.8.0
    Preparing search index...

    Interface WebRTCImplementation

    WebRTC classes used to create connections and media streams. Each one falls back to the global of the same name, so pass them only in runtimes that lack them, such as Node.js with @roamhq/wrtc.

    interface WebRTCImplementation {
        MediaStream?: {
            prototype: MediaStream;
            new (): MediaStream;
            new (stream: MediaStream): MediaStream;
            new (tracks: MediaStreamTrack[]): MediaStream;
        };
        RTCPeerConnection?: {
            prototype: RTCPeerConnection;
            generateCertificate(
                keygenAlgorithm: AlgorithmIdentifier,
            ): Promise<RTCCertificate>;
            new (configuration?: RTCConfiguration): RTCPeerConnection;
        };
    }
    Index
    MediaStream?: {
        prototype: MediaStream;
        new (): MediaStream;
        new (stream: MediaStream): MediaStream;
        new (tracks: MediaStreamTrack[]): MediaStream;
    }

    MediaStream constructor. Needed only to share or receive media; without it, share() rejects and incoming tracks are ignored.

    RTCPeerConnection?: {
        prototype: RTCPeerConnection;
        generateCertificate(
            keygenAlgorithm: AlgorithmIdentifier,
        ): Promise<RTCCertificate>;
        new (configuration?: RTCConfiguration): RTCPeerConnection;
    }

    RTCPeerConnection constructor.

    Type Declaration

      • new (configuration?: RTCConfiguration): RTCPeerConnection
      • Parameters

        • Optionalconfiguration: RTCConfiguration

        Returns RTCPeerConnection

    • prototype: RTCPeerConnection
    • generateCertificate: function
      • The generateCertificate() static function of the RTCPeerConnection interface creates an X.509 certificate and corresponding private key, returning a promise that resolves with the new RTCCertificate once it's generated.

        MDN Reference

        Parameters

        • keygenAlgorithm: AlgorithmIdentifier

        Returns Promise<RTCCertificate>