Skip to content

Simple CLI demo for MacOs running agains mediasoup-demo#197

Merged
jmillan merged 2 commits into
v3from
demo
Jun 15, 2026
Merged

Simple CLI demo for MacOs running agains mediasoup-demo#197
jmillan merged 2 commits into
v3from
demo

Conversation

@jmillan

@jmillan jmillan commented Jun 12, 2026

Copy link
Copy Markdown
Member

Basic CLI demo:

  • Connects to a mediasoup-demo server via WS as a browser client does.
  • Produces audio and video.
  • Consumes remote participants media (no rendering).
  • Creates DataProducer|DataConsumer.
    • Prints the received messages via DataChannel.

As an example, this is the output you'll see when running the app:

[room] connected
[room] device loaded
[room] joined
[send] connection state changed to: checking
[send] connection state changed to: connected
[send] connection state changed to: completed
[recv] connection state changed to: checking
[room] consuming audio from erztw5ev
[room] mic producer: 4b8af09a-f1ab-4cbe-afc3-d7dbfe36621f
[recv] connection state changed to: connected
[recv] connection state changed to: completed
[video] camera: MacBook Pro Camera
[room] consuming video from erztw5ev
[demo] video track from erztw5ev
[data] Welcome mediasoupclient-demo! ☺️
[video] camera started 640x480@30fps
[room] camera producer: 3fa1a8c6-43a5-4431-b3f1-d10653bfb783
[room] chat data producer: b8003f93-544a-4d3a-806e-e280de63e52d
[demo] running — press Ctrl+C to quit

Sets the foundations for a more elaborated app.

NOTE 1: This is merely a testing app so we can test the library against our demo.
NOTE 2: The demo is inside the libmediasoupclient repo on purpose, so we can run the app and test the library as we develop it.

Once this is merged, we can remove mediasoup-broadcaster-demo which is unmaintained and most probably not working, and use this app instead, which connects as a regular user.

NOTE 3: I may probably stick to Listener callback pattern all around. In some places I'm passing callbacks in constructor arguments, and in some other I'm passing the parent object to the child does parent.onFooBar() which is not nice.

Basic CLI demo:
- Connects to a mediasoup-demo server via WS.
- Produces audio and video.
- Consumes remote participants media (no rendering).
- Creates DataProducer|DataConsumer.
  - Prints the received messages via DataChannel.

Sets the foundations for a more elaborated app.

NOTE: This is merely a testing app so we can test the library agains our demo.
@jmillan jmillan requested a review from ibc June 12, 2026 14:44
@ibc

ibc commented Jun 12, 2026

Copy link
Copy Markdown
Member

If it prints messages received via DataChannel why am I not seeing the "Hello xxx" message?

@ibc

ibc commented Jun 12, 2026

Copy link
Copy Markdown
Member

If it prints messages received via DataChannel why am I not seeing the "Hello xxx" message?

Sorry, do you mean that you have created a built-in demo server in Rust within this PR?

@jmillan

jmillan commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

If it prints messages received via DataChannel why am I not seeing the "Hello xxx" message?

"[data] Welcome mediasoupclient-demo! ☺️"

@jmillan

jmillan commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

If it prints messages received via DataChannel why am I not seeing the "Hello xxx" message?

Sorry, do you mean that you have created a built-in demo server in Rust within this PR?

What 😀?? No, this demo app resides in libmediasoupclient repo for the reasons given. It connects to the existing mediasoup-demo via WS, as browsers do.

@ibc

ibc commented Jun 12, 2026

Copy link
Copy Markdown
Member

A tip: never review a big PR on mobile.

@jmillan jmillan merged commit 2c60992 into v3 Jun 15, 2026
1 check passed
@jmillan jmillan deleted the demo branch June 15, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants