API Docs for:
Show:

rtc.internal.StreamCollection Class

Helper handling the mapping of streams for RemotePeer

Constructor

rtc.internal.StreamCollection

()

Item Index

Methods

Properties

Events

Methods

get

(
  • name
)
Promise

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:

update

(
  • data
)

Set stream description and generate promises

Parameters:

  • data Object

    An 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 String

    The user defined name of the stream

  • stream Promise -> rtc.Stream

    Promise to the stream