rtc.internal.ChannelCollection Class
Helper which handles DataChannel negotiation for RemotePeer
Methods
_update
()
private
Matches remote and local descriptions and creates promises common DataChannels
get
(
Promise -> DataChannel
-
name
Get a promise to a DataChannel. Will resolve if DataChannel was offered and gets initiated. Might reject after remote and local description are processed.
Parameters:
-
name
StringThe label of the channel to get
Returns:
Promise -> DataChannel:
Promise for the DataChannel
resolve
(
-
channel
Resolves promises waiting for the given DataChannel
Parameters:
-
channel
DataChannelThe new channel
setLocal
(
-
data
Set the local channel description.
Parameters:
-
data
ObjectObject describing each offered DataChannel
setRemote
(
-
data
Set the remote channel description.
Parameters:
-
data
ObjectObject describing each offered DataChannel
Events
data_channel_added
(
-
name
-
stream
A new data channel is available
Parameters:
-
name
StringName of the channel
-
stream
Promise -> rtc.StreamPromise of the channel