Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Janus example #158

Merged
merged 7 commits into from
Sep 24, 2024
Merged

Janus example #158

merged 7 commits into from
Sep 24, 2024

Conversation

davidkornel
Copy link
Member

This PR adds the Janus WebRTC server example. It includes a README file explaining all the steps to install Janus and STUNner into Kubernetes. It also comes with two yaml manifests containing configuration for the STUNner ecosystem and deployment manifests for the Janus ecosystem.

Self built Janus images are pushed under the l7mp org on Docker Hub. Janus Web Janus Gateway

TODO: Figure about the deployment in Kubernetes. The missing figure is highlighted in the README.

Tested ✔️

Someone else should test it before merging.

Copy link
Member

@levaitamas levaitamas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, thanks! I left some minor comments. Please address them and do the fig.


The figure below shows Janus deployed into regular Kubernetes pods behind STUNner without the host-networking hack. Here, Janus is deployed behind STUNner in the [*media-plane deployment model*](../../DEPLOYMENT.md), so that STUNner acts as a "local" STUN/TURN server for Janus, saving the overhead of using public a 3rd party STUN/TURN server for NAT traversal.

![STUNner Janus integration deployment architecture](../../img/stunner_janus.svg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it would be great to have an arch fig here, thanks!


## Installation

Let's start with a disclaimer. The Janus client-side application must work over a secure HTTPS connection, because [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#browser_compatibility) is available only in secure contexts. This implies that the client-server signaling connection must be secure too. In this demo, we will aim to obtain a proper CA-signed certificate (self-signed certificates haven't been tested). Obtaining a valid TLS certificate is a challenge. Thus, the majority of the below installation guide will be about securing client connections to Janus over TLS; as it turns out, once HTTPS is correctly working integrating Janus with STUNner is very simple.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps move this paragraph to a NOTE?

Endpoints: [10.76.1.4, 10.80.4.47]
```

Note that Janus itself will not use STUNner (that would amount to a less efficient [symmetric ICE mode](../../DEPLOYMENT.md)); with the above configuration we are just telling Janus Web to instruct its clients to use STUNner to reach the Janus Gateway server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please clarify: Janus will not use STUNner as a TURN server


## Test

After installing everything, execute the following command to retrieve the URL of your fresh Janus demo app:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking: fresh -> freshly deployed?

echo client-$INGRESSIP.nip.io
```

Copy the URL into your browser, and now you should be greeted with the About page. On the landing page navigate to the Video call plugin demo (`/demos/videocall.html`). Duplicate the tab and register two users in the system and make a call. If everything is set up correctly, you should be able to connect to a room. If you repeat the procedure in a separate browser tab you can enjoy a nice video-conferencing session with yourself, with the twist that all media between the browser tabs is flowing through STUNner and the Janus Gateway server deployed in you Kubernetes cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a Help section to the very end?
An example:

# Help

STUNner development is coordinated in Discord, feel free to [join](https://discord.gg/DyPgEsbwzc).

@davidkornel
Copy link
Member Author

@levaitamas can you check one more time? Notice that I also added the dockerfiles and added a respective section also.

@levaitamas
Copy link
Member

LGTM. Thanks again!

@levaitamas levaitamas merged commit b64b2ea into main Sep 24, 2024
3 checks passed
@levaitamas levaitamas deleted the janus-example-doc branch September 24, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants