RTippin / messenger-demo

Laravel messenger demo app using rtippin/messenger. Private and group threads with real-time messaging, reactions, attachments, calling, chat bots, and more!
https://tippindev.com
153 stars 46 forks source link

Configuration of Janus WebRTC #16

Closed ahmedcharef closed 2 years ago

ahmedcharef commented 2 years ago

Hi Team!

I have installed Janus WebRTC and I want to configure it with laravel messenger.

I have run the janus with config:

janus --config conf/janus.plugin.videoroom.jcfg.sample

It seems that it works fine:

...
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!

So I have add below enivrement variable to .env in laravel:

JANUS_SERVER_ENDPOINT=http://192.168.126.129:8088/janus
JANUS_SERVER_ADMIN_ENDPOINT=http://192.168.126.129:8088/janus
JANUS_VERIFY_SSL=false
JANUS_DEBUG=true
JANUS_ADMIN_SECRET=
JANUS_API_SECRET=
JANUS_VIDEO_ROOM_SECRET=
JANUS_CLIENT_DEBUG=false

The problem is that i the video call is not working, it send session expired:

image

please help, thanks in advance.

RTippin commented 2 years ago

Firstly, is the job that sets the call up working (and updates the call record in your database with the room ID and secret)? If so, can you see if the room does exists in your janus server?

You should also check your dev console in your browser, both the console logs and the network tab/websockets, and see what errors you find.

The only thing out of place to me is that you did not define an API secret in janus, and you are using their sample config vs janus.plugin.videoroom.jcfg. I am not able to give you much direction in the setup of janus itself though.

RTippin commented 2 years ago

Janus is not directly part of my package / app. I would recommend going through their official Documentation and running the Echo Test locally to ensure your janus server is fully functional first, then also try out the Video Room Test, as this should tell you if you have the server configured properly. These demos are the same ones hosted on their website Here but you would be running them on your own machine.

ahmedcharef commented 2 years ago

Hi @

Janus is not directly part of my package / app. I would recommend going through their official Documentation and running the Echo Test locally to ensure your janus server is fully functional first, then also try out the Video Room Test, as this should tell you if you have the server configured properly. These demos are the same ones hosted on their website Here but you would be running them on your own machine.

Sorry @RTippin but as you can see from below screenshot, the problem is in JanusServer.js, image

I have tested the video room from janus official doc and it works fine, also the messenger queue works well too. image

Can you share the janusServer.js and app.js not minified , hope you can help.

RTippin commented 2 years ago

So this demo has my https://github.com/RTippin/messenger-ui and https://github.com/RTippin/janus-client packages installed.

RTippin commented 2 years ago

@etraeel My responses above were for @ahmedcharef . Please read through them as they may apply to you as well. Janus is out of my control, so I can only help if you have it working and only have confusion with how my UI intakes a few config values.

RTippin commented 2 years ago

@etraeel Then you need to check your queue and see if the call setup is failing, because that is what "creates" a room with janus via the queued job. Your call should not even be marked with setup_complete unless that happened, and the UI is not meant to even try to connect to janus unless the call is marked as such. I don't know which steps you are bypassing here.