meetecho / janode

A Node.js adapter for the Janus WebRTC server
ISC License
98 stars 36 forks source link

Connect fails while running th demo code in repo #15

Closed MUHAMMAD-AMMAR-TANWEER closed 2 years ago

MUHAMMAD-AMMAR-TANWEER commented 2 years ago

Hey I am new to the community. I clone the repository do the instructions as defined but connection fails every time whether http or https.


PS CXXX\> npm run start

> start
> node src/index.js

2022-09-16T14:09:37.571Z - INFO : [index.js] scheduled connection in 1 seconds
2022-09-16T14:09:37.578Z - INFO : [index.js] server listening on https://0.0.0.0:4443/janode
2022-09-16T14:09:38.583Z - INFO : [index.js] connecting Janode...
2022-09-16T14:09:38.588Z - INFO : [janode.js] creating new connection
2022-09-16T14:09:38.594Z - INFO : [tmanager.js] [4970643651838865] creating new transaction manager (debug=false)
2022-09-16T14:09:38.607Z - INFO : [transport-ws.js] [4970643651838866] trying connection with ws://127.0.0.1:8118/
2022-09-16T14:09:38.652Z - ERROR: [transport-ws.js] [4970643651838866] websocket error (connect ECONNREFUSED 127.0.0.1:8118)
2022-09-16T14:09:38.654Z - INFO : [transport-ws.js] [4970643651838866] websocket closed code=1006 reason= clean=false
2022-09-16T14:09:38.657Z - INFO : [tmanager.js] [4970643651838865] clearing transaction manager
2022-09-16T14:09:38.660Z - ERROR: [transport-ws.js] [4970643651838866] connection failed, will try again in 10 seconds...

As this person is able to run the code fine.Here he runs without error

https://youtu.be/CeZzIedQA6s?t=893

atoppi commented 2 years ago

Hello, thanks for trying janode! Janode needs a running instance of janus to work. It looks like you either forgot to start janus, enable websocket transport on janus or set the port to 8118.

That person is me btw.

MUHAMMAD-AMMAR-TANWEER commented 2 years ago

I understand that I forget to start janus server. Basically what I am trying to do is to get the camera feed on webpage through webrtc protocol via janode. Now I got confuse that how I can get web feed and send to webpage I am trying to do this with demo video https://janus.conf.meetecho.com/mvideoroomtest.html . (means taking this feed and send to my custom designed page)

If @atoppi you can guide me it would be really helpful

MUHAMMAD-AMMAR-TANWEER commented 2 years ago

@atoppi yes I forget to start the janus server and ran the code my bad