Skip to content

Releases: rtc-io/rtc-media

2.0.0

01 Dec 01:16
Compare
Choose a tag to compare

This is a significant rewrite of rtc-media which encapsulates the following:

  • The package exports a single function which can be used to capture media and/or render streams to media elements using rtc-capture and rtc-attach respectively. Behaviour is sensitive to options that are passed to the function.
  • To initiate a capture, then render operation provide a constraints option (or use the defaults of {video: true, audio: true }) and a target that you wish to render the resulting stream to. In the event that you wish to simply capture a stream and not render, then you should be using either the rtc-capture or getusermedia packages.
  • To render an existing stream, provide a stream option and a target that you with to render the stream to.
  • Any plugins provided as options are passed through to the underlying rtc-capture and rtc-attach packages and are dealt with appropriately.

With this update we see the functionality of rtc-capture and rtc-attach made available at a convenient layer, without the code duplication that was present when using the rtc-media@1.x releases.