-
Notifications
You must be signed in to change notification settings - Fork 85
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
using this with an NAF project? #8
Comments
I followed the different Hubs PRs, so I can reply to some of your questions. |
Excellent, thanks. That's enough to make getting started and going in the dark a bit possible. (Any other responses are welcome as well, of course.) |
I really am not familiar with this project in detail; what you've shared is extremely helpful, but I'm still lacking a lot of context about how using JWT tokens with this project works. If someone behind this project could spend 30 minutes writing a quick readme update that gives context to an outsider, it would go a long way to making this project more accessible. Thanks so much already for all you've given, though, I'll keep trying in the meantime. |
Obviously you need your own backend where the user authenticate, and return a JWT token. Then on the naf adapter, you need to set a client id and jwt token, on hubs this is done here: https://github.com/mozilla/hubs/blob/bf78a09218109ede68a41c7fa504168011983d1a/src/hub.js#L1455-L1456 |
I have a naf project where I use Janus 0.9.5 with janus-plugin-sfu master (commit mozilla/janus-plugin-sfu@3694c36), and js client naf-janus-adapter 3.0.20 (not master with version 4.0.x that introduced new Some years ago, I guess Hubs did use this. With janus-sfu-plugin it created two datachannels to support chat and components updates https://github.com/mozilla/naf-janus-adapter/blob/v3.0.20/src/index.js#L429-L438 |
Thanks, that's the most helpful summary of a collection of tidpits I'd pieced together about all of that over the last weeks that I've seen in one place, along with some stuff that I hadn't seen clearly anywhere. I'm very close to having this whole janus setup working, but something isn't quite right. I see the adapter is correctly pinging my janus server, but it gets an error back (I think from the janus sfu plugin), which reads Any ideas? Also, I do need to use This is super helpful, if there's a better way to have this conversation than here, let me know, picking your brain for a few minutes would save me a lot of headache. I'd like to document this process somewhere when I'm done so it's available and out there for once all together. (I see you're on the aframe slack, I'll ping you there, though I don't know if you're still active or not.) |
I'm glad you're making progress. I remember having the For the transport, you're right. For I'm not connected anymore on slack aframe, but I will open it again. |
You will need the JWT to work if you want the kick a user feature though. I currently don't have it. :-) |
Btw, I don't know if you found the example at https://github.com/mozilla/naf-janus-adapter/blob/master/examples/index.html |
About horizontal scaling, you may find some answers here Hubs-Foundation/hubs#2887 A note about version 4.0.x of naf-janus-adapter, this version changed the |
I see. I'm tempted to put together a repo explaining all this clearly and giving a functional readme on the state of things after all of this. That's all invaluable information--I had heard pieces here and there, but it's nice to see it all put together as a single coherent narrative. |
The
|
As far as I understand, Hubs server reticulum uses the guardian elixir module https://github.com/ueberauth/guardian to generate the jwt perms token here https://github.com/mozilla/reticulum/blob/e50b16244a3ef6b41617fd4c81c0537dc2830306/lib/ret/perms_token.ex#L27 that works for 5 minutes. This perms token is different that the one for authentication that lives longer and is set in localStorage. In the janus conf auth_key should point to the public RSA key in DER format If you already have a node app on the server, you can try creating a JWT token with https://github.com/auth0/node-jsonwebtoken
When your user is logged in with your node app, return this token and set it with |
The readme is a bit sparse. Was planning to use hubs-based Janus-NAF setup with our project, but am considering giving this a try instead.
We are using easyrtc adapter and NAF right now. I'm trying to roadmap a transition to a mediasoup SFU swap in instead.
(1) I don't see any 'adapter' for NAF; do we just use the Janus adapter? Is this designed to be a drop-in replacement for the api it was using?
(2) Does one need to use the hubs-fork of NAF (also, where is that?)
(3) If one gets this repo up and running, this is the mediasoup server, right? It's not 100% clear what this repo is; the janus plugin repo was just a plugin you build and add to an existing running janus server, but I don't know how the plugin system works for mediasoup, and I'm thinking this repo probably is the whole SFU server...? Is that right?
(4) What changes in the readme if I'm running this for me? I assume, for example, that I can't use your SSL certs? Do I need to generate my own? Info about that? Etc.
Thanks!
The text was updated successfully, but these errors were encountered: