Jump to content
  • 0

Connect to Websocket Datachannel


Daniel Biagi
 Share

Question

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

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Posted Images

1 answer to this question

Recommended Posts

  • 0

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:

Btw, could you please add your AMS logs(/usr/local/antmedia/log/ant-media-server.log file)? 

Best Regards,
Selim

 

 

 

Selection_009.thumb.png.3e5398e6b57dfc015b2eea902301fb0a.png

Link to comment
Share on other sites

 Share


×
×
  • Create New...