Daniel Biagi Posted October 5, 2020 Share Posted October 5, 2020 Hello, I am trying to setup a NodeJS listener on the publisher's data channel but I can't figure out how to do it properly. I tried using a npm package called wrtc but it seems it operates a little different than AMS. What should I use on these variables (marked with bold)? { command : "takeCandidate", streamId : "stream1", label : "${CANDIDATE.SDP_MLINE_INDEX}", id : "${CANDIDATE.SDP_MID}", candidate : "${CANDIDATE.CANDIDATE}"} I am able to joinRoom and then get some ping/pongs, but after some seconds apparently the connection is dropped (maybe because I didn't answer the candidates) with the message: Received: '{"streamId":"3ZWSlhKwKfnYa4aJ26nmA749K3","definition":"play_finished","command":"notification"}' Could you help me setting this up correctly, please? Thanks! Daniel Biagi Link to comment Share on other sites More sharing options...
0 Selim Emre Posted October 6, 2020 Share Posted October 6, 2020 Hi Daniel, Thank you for the great question! You can check SDP parameters in WebSocket Messages Tab on Google Console log for debugging. I attached sample WebRTC Conference Room WebSocket messages. Also, you check our WebRTC Javascript SDK and WebRTC Conference page as below: https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/conference.html https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/js/webrtc_adaptor.js Btw, could you please add your AMS logs(/usr/local/antmedia/log/ant-media-server.log file)? Best Regards, Selim Link to comment Share on other sites More sharing options...
Question
Daniel Biagi
Link to comment
Share on other sites
Top Posters For This Question
1
1
Popular Days
Oct 5
1
Oct 6
1
Top Posters For This Question
Selim Emre 1 post
Daniel Biagi 1 post
Popular Days
Oct 5 2020
1 post
Oct 6 2020
1 post
Posted Images
1 answer to this question
Recommended Posts