How to use the wrtc.RTCPeerConnectionState.Failed function in wrtc

To help you get started, we’ve selected a few wrtc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github noia-network / webrtc-direct / server / src / webrtc-direct.ts View on Github external
pc1.onconnectionstatechange = (event: Event) => {
            logger.verbose(`${LOG_PREFIX} ${chalk.yellow("connection-state")}: ${chalk.yellowBright(pc1.connectionState.toString())}`);
            if (pc1.connectionState === RTCPeerConnectionState.Failed) {
                for (const [, ch] of Object.entries(this.channels)) {
                    if (ch.pc === pc1) {
                        this.channelClose(ch);
                    }
                }
            }
        };

wrtc

Standards-compliant WebRTC implementation for Node

BSD-2-Clause
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis