mslosarz / nextrtc-signaling-server

NextRTC is simple WebRTC signaling server written in java. It provides signal exchange and easy to integrate API
http://nextrtc.org
MIT License
187 stars 60 forks source link

RTP Streaming through the browser #3

Closed pancitmiki closed 6 years ago

pancitmiki commented 8 years ago

Hi Marci,

I'm in the middle of building your project and I was just wanting to know if this would be possible with your nextRTC project.

I have an existing spring web application that streams rtp media to a client but I'm using a java applet to accomplish this. It uses a low level recorder that streams the RTP on a UDP port of the client. The RTP streams are streams coming from PSTN -> IP phone calls. So I was thinking of moving to WebRTC using your project to get rid of the java applet. I've already created a peer and am able to send out the candidates to the web socket. Now, whenever I get an Ice Candidate, I would like to change the rtp port of the ice candidate to be the port where the low level recorder is streaming the RTP.

My questions would be,

1. How do I identify, from an ICE candidate, that such candidate corresponds for the audio RTP?

2. Is it safe to change the ICE candidate port? When I tried this out, the establishment of the connection when creating an answerer-offerer scenario on a client failed.

I basically do not want 2 clients to make calls to each other. I just want to stream an existing RTP media to a client.

Please let me know what you think.

Thank you.