rtc.internal.StreamCollection Class
Helper handling the mapping of streams for RemotePeer
Constructor
rtc.internal.StreamCollection
()
Methods
get
(
Promise
-
name
Gets a promise for a stream with the given name. Might be rejected after update()
Parameters:
-
name
String
Returns:
Promise:
The promise for the rtc.Stream
resolve
(
-
stream
Add stream to the collection and resolve promises waiting for it
Parameters:
-
stream
rtc.Stream
update
(
-
data
Set stream description and generate promises
Parameters:
-
data
ObjectAn object mapping the stream ids to stream names
Properties
streams
Object
Contains the promises which will resolve to the streams
Events
steam_added
(
-
name
-
stream
A new stream was added to the collection
Parameters:
-
name
StringThe user defined name of the stream
-
stream
Promise -> rtc.StreamPromise to the stream