How to setup mediasoup-client on React?

Hello,
I have two problems related to mediasoup-client.

  1. I am not able to set up a mediasoup-client in the existing react app.
  2. If I used GitHub - versatica/mediasoup-demo: mediasoup official demo application then I am not able to do WebSocket in another IP. Seem like I host a server on the same network and run the client in that same network but I got WebSocket connection failed.

Yes you can, you just install mediasoup-client just like a normal package, just as you may do to install moment.js :wink:

npm install mediasoup-client@3 --save

as per official docs

and use it as
import { Device } from 'mediasoup-client'

Am sure connection failed due to some other conditions, but not as you mentioned above,
mybe you should try to describe this problem more

What is the config for the Device from mediasoup-client?

After importing Device you use it as mediasoup to connect to mediasoup serverside
mostly you’ll create a worker then router and ask that router for dtlsParameter. and you put those parameter to your device,
docs just explained all this

[WebRTC: mediasoup (SFU) introduction - Part 1 - YouTube](https://Check this intro)

Let’s, understand by the example.

I have server(1) asset where server host with IP 192.1XX.XX.12 and port 4443.
and I have a client(2) asset where I developed a client app where client IP 192.1XX.XX.25 and port 3000.
So the problem is in the client app I am not able to get a connection to the websocket which hosts the client(2) asset.

Both assets are in the same network.

Thanks for the link.
do you have a config file or code?