API Docs for:
Show:

rtc.signaling.MucSignalingPeer Class

Signaling peer for multi user chats.

For a detailed description of the signaling protocol see rtc.signaling.MucSignaling

Constructor

rtc.signaling.MucSignalingPeer

(
  • channel
  • peer_id
  • status
  • first
)

Parameters:

  • channel rtc.signaling.Channel

    The channel to the siganling server

  • peer_id String

    The id of the remote peer

  • status Object

    The status of the remote peer

  • first Boolean

    Whether the local peer was in the room before the remote peer

Item Index

Methods

Properties

Methods

send

(
  • event
  • data
)
Promise
Sends the event with the given payload to the remote peer

Parameters:

  • event String
    The id of the event
  • data Object
    The payload of the event

Returns:

Promise: Promise which will be resolved once the message is sent

Properties

first

Boolean
Whether the local user was in the room before the remote user (used to determine which peer will initiate the connection)

id

String

The id of the remote peer

status

Object
The status object of the remote peer

Events

left

()
The remote peer left the room

message

(
  • event
  • data
)
Received a message from the remote peer

Parameters:

  • event String
    ID of the event
  • data Obejct
    Payload of the event

status_changed

(
  • status
)
The status object of the remote peer was updated

Parameters:

  • status Object
    The new status