SignalingChannel.on() Overload 1

DESCRIPTION

Add listener for channel state changes.

DECLARATION

on(target: "channelstatechange", f: () => void): void

PARAMETERS

target:
should be "channelstatechange".
f:
the callback function to invoke.

Overload 2

DESCRIPTION

Add a listener invoked when a signaling message is received.

DECLARATION

on(target: "message", f: (messge: JSONValue) => Promise<void>): void

PARAMETERS

target:
should be "message".
f:
the callback function to invoke.

Overload 3

DESCRIPTION

Add listener for signaling errors.

When this happens the signaling channel is dead and cannot come back to live, the webrtc connection needs to be teardown.

DECLARATION

on(target: "error", f: (err: unknown) => void): void

PARAMETERS

target:
should be "error".
f:
the callback function to invoke.