node-webrtc-examples
node-webrtc-examples copied to clipboard
Unable to record video from different network
Based on examples/record-audio-video-stream, when I run it on different network, it seems that it does not go through this listener
videoSink.addEventListener('frame', ({ frame: { width, height, data }}) => {
everything works fine on same network.
I tried to add below config too, but no luck
peerConnections = new RTCPeerConnection({
sdpSemantics: 'unified-plan',
iceServers: [
{
urls : 'stun:stun.l.google.com:19302'
},
{
urls : 'turn:numb.viagenie.ca',
username: "[email protected]",
credential: "password",
}
]
}
})
Is there anything that I could possibly miss out?
I am facing this same issue. Is there a way to resolve this?
Same issue
Same issue
Has anyone solved this?
Refer the document here. These examples are not currently support for srflx/relay candidate.
So STUN/TURN server cannot work for these example right now.
https://github.com/node-webrtc/node-webrtc-examples/blob/master/README.md
RTCPeerConnection Negotiation
RTCPeerConnections are negotiated via REST API. The Server always offers (with host candidates) and the Client always answers. In order to negotiate a new RTCPeerConnection, the Client first POSTs to /connections. The Server responds with an RTCPeerConnection ID and SDP offer. Finally, the Client POSTs an SDP answer to the RTCPeerConnection's URL.
Client Server
| |
| POST /connections |
| |
|---------------------------------------------------->|
| |
| 200 OK |
| { "id": "$ID", "localDescription": "$SDP_OFFER" } |
| |
|<----------------------------------------------------|
| |
| POST /connections/$ID/remote-description |
| $SDP_ANSWER |
| |
|---------------------------------------------------->|
| |
| 200 OK |
| |
|<----------------------------------------------------|