Skip to content

five-on-it / apps/server/src/rtc-host / RtcHost

Class: RtcHost ​

Defined in: apps/server/src/rtc-host.ts:102

The RTC worker and its peers (see the module documentation).

Implements ​

Constructors ​

Constructor ​

new RtcHost(options): RtcHost

Defined in: apps/server/src/rtc-host.ts:123

Parameters ​

options ​

RtcHostOptions

Returns ​

RtcHost

Methods ​

close() ​

close(): void

Defined in: apps/server/src/rtc-host.ts:181

Stops the worker for good (the server shutting down).

Returns ​

void


fellBack() ​

fellBack(reason): void

Defined in: apps/server/src/rtc-host.ts:161

Counts a connection fallen back to its WebSocket.

Parameters ​

reason ​

"full" | "failed" | "dropped" | "timeout" | "silence" | "worker" | "remote" | "frames"

Returns ​

void

Implementation of ​

RtcPeerHost.fellBack


open() ​

open(offerSdp, events): RtcPeerHandle

Defined in: apps/server/src/rtc-host.ts:132

A peer for a client's offer, in the worker (started if need be).

Parameters ​

offerSdp ​

string

events ​

RtcPeerEvents

Returns ​

RtcPeerHandle

Implementation of ​

RtcPeerHost.open


stats() ​

stats(): RtcStats

Defined in: apps/server/src/rtc-host.ts:166

The channel's numbers now.

Returns ​

RtcStats