3.14.1 • Published 30 days ago

@mafalda-sfu/remote-mediasoup-client-mock v3.14.1

Weekly downloads
-
License
ISC
Repository
github
Last release
30 days ago

Remote Mediasoup client mock

Code coverage Docs coverage npm

This project host a class with the same API of the Remote Mediasoup client. It's intended to be used for both testing purposes and as a testbed for the migration of projects currently based on Mediasoup to use the Remote Mediasoup client instead. Behavior is mostly the same that the one offered by the Remote Mediasoup client instances, being the only two differences:

  1. Remote Mediasoup client mock uses a local instance of Mediasoup instead of connecting to an instance of Remote Mediasoup server
  2. due to that, Connection WebSocket events are emulated instead of being real ones

Install

npm install --save-dev @mafalda-sfu/remote-mediasoup-client-mock

API

See API documentation.

Usage

If you already have a Mediasoup based project, to use Remote Mediasoup client mock on it you'll only need to do two changes in your project code:

  1. Replace the mediasoup import for remote-mediasoup-client-mock:

    - import mediasoup from 'mediasoup'
    + import RemoteMediasoupClientMock from 'remote-mediasoup-client-mock'
  2. Create the instance of the RemoteMediasoupClientMock object, wait for its connected event, and access to the mediasoup property:

    + const remoteMediasoupClientMock = new RemoteMediasoupClientMock
    +
    + await once(remoteMediasoupClientMock, 'connected')
    +
    + const {mediasoup} = remoteMediasoupClientMock

After that, the mediasoup variable will have an object that's API compatible with the Mediasoup API provided by the Mediasoup package.

3.14.1

30 days ago

3.14.0

1 month ago

3.13.24

2 months ago

3.13.23

2 months ago

3.13.22

3 months ago

3.13.20

3 months ago

3.13.19

3 months ago

3.13.19-0

3 months ago

3.13.18

3 months ago

3.13.17-0

4 months ago

3.12.12

8 months ago

3.12.16

6 months ago

0.0.0

12 months ago