0.1.1 • Published 2 years ago

sfu-observer-js v0.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Sfu Observer

This client application helps you sampling your SFU. After it is started, it generates SfuSamples. SfuSamples can be processed by an observer. Observer match samples originated from client applications and samples originated from SFU. After you setup an observer, you can integrate your SFU and start watching your transports.

Install

Install sfu-observer-js

    npm i sfu-observer-js

Observe your SFU

Mediasoup

    const { MediasoupSfuObserver } = require("sfu-observer-js");
    const mediasoup = require('mediasoup');
    // ...
    const POLLING_INTERVAL_IN_MS = 10000;
    const HOST = "localhost:7080";
    const SERVICE_ID = "myServiceId";
    const MEDIAUNIT_ID = "mySFU";
    const sfuObserver = MediasoupSfuObserver.builder()
            .withMediasoup(mediasoup)
            .withPollingInterval(POLLING_INTERVAL_IN_MS)
            .withEndpoint(`ws://${HOST}/sfusamples/${SERVICE_ID}/${MEDIAUNIT_ID}`)
            .build();

    // start monitoring when you want the service to start polling
    sfuObserver.start();
    
    // optionally, you can subscribe to the event emitted when a sample is ready
    sfuObserver
        .onSample(sample => {
            console.log("sfu sample", sample);
        })
        .onError(error => {
            console.warn("An error occurred", error);
        })
    ;

    // stop monitoring whenever you want no longer to monitor the service
    sfuObserver.stop();
0.0.30

2 years ago

0.0.31

2 years ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.23

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.1

3 years ago