Skip to content

sandro-salzmann/mediasoup-easy-one-to-many-producer-js

Repository files navigation

mediasoup-easy-one-to-many-producer-js

Video producer of an easy to use one-to-many broadcasting tool based on mediasoup.

Installation

npm install mediasoup-easy-one-to-many-producer-js

Getting started

Call useProduce to setup a producer using your options. useProduce will return functions that let you establish the connection to the mediasoup router (connect) and start publishing a stream (publish).

import { useProduce } from "mediasoup-easy-one-to-many-producer-js";

const { connect, publish } = useProduce({
    url: "http://localhost:8080",
});

// ...
connect() // initialize the connection to the mediasoup router
// ...
publish() // start publishing a stream
// ...

API

useProduce(options: ProduceOptions)

Returns functions for connecting to the server and publishing a video stream.

ProduceOptions

Field & Type Description Required Default
url
string
URL of the server where the mediasoup router is running on Yes

Known bugs

  • (Sometimes) doesn't work in react inside of <React.StrictMode>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published