node-webrtc / node-webrtc-examples

MediaStream and RTCDataChannel examples using node-webrtc
508 stars 161 forks source link

fix (https://github.com/node-webrtc/node-webrtc-examples/issues/22) #23

Closed yishengjiang99 closed 3 years ago

yishengjiang99 commented 4 years ago
yishengjiang99 commented 4 years ago

addresses https://github.com/node-webrtc/node-webrtc-examples/issues/22

codersneha3012 commented 4 years ago

Hi,

I have integrated this fix but I am getting error. Can you suggest something? Request URL: https://xx.xx.xx.xx:8001/connections/25b985cd-86d9-4b0b-9227-f94dcacb4435/remote-description Request Method: POST Status Code: 400 Bad Request Remote Address: 18.219.188.4:8001 Referrer Policy: no-referrer-when-downgrade Access-Control-Allow-Origin: Connection: keep-alive Content-Length: 11 Content-Type: text/plain; charset=utf-8 Date: Wed, 10 Jun 2020 13:22:59 GMT ETag: W/"b-EFiDB1U+dmqzx9Mo2UjcZ1SJPO8" X-Powered-By: Express Accept: /* Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Connection: keep-alive Content-Length: 2330 Content-Type: application/json Host: 18.219.188.4:8001 Origin: https://localhost:3001 Referer: https://localhost:3001/ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 {type: "answer",…} sdp: "v=0 ↵o=- 7966481059223158887 2 IN IP4 127.0.0.1 ↵s=- ↵t=0 0 ↵a=group:BUNDLE 0 ↵a=msid-semantic: WMS 7buDoayijhoX4kqI8tjLFtA49zbwLfYeMppg ↵m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125 ↵c=IN IP4 0.0.0.0 ↵a=rtcp:9 IN IP4 0.0.0.0 ↵a=ice-ufrag:mDHA ↵a=ice-pwd:aF6WtNqoQTKjvgk/wOhv/rEj ↵a=ice-options:trickle ↵a=fingerprint:sha-256 1D:43:FA:02:0A:73:D1:1B:0D:5F:84:18:48:D7:E0:83:18:82:0B:87:C4:A3:F2:5F:F5:75:FA:EB:8C:62:93:E3 ↵a=setup:active ↵a=mid:0 ↵a=extmap:14 urn:ietf:params:rtp-hdrext:toffset ↵a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time ↵a=extmap:13 urn:3gpp:video-orientation ↵a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 ↵a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay ↵a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type ↵a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing ↵a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07 ↵a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space ↵a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid ↵a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id ↵a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id ↵a=sendrecv ↵a=msid:7buDoayijhoX4kqI8tjLFtA49zbwLfYeMppg f67ac443-16f5-480e-b5f2-839337f04b85 ↵a=rtcp-mux ↵a=rtcp-rsize ↵a=rtpmap:96 VP8/90000 ↵a=rtcp-fb:96 goog-remb ↵a=rtcp-fb:96 transport-cc ↵a=rtcp-fb:96 ccm fir ↵a=rtcp-fb:96 nack ↵a=rtcp-fb:96 nack pli ↵a=rtpmap:97 rtx/90000 ↵a=fmtp:97 apt=96 ↵a=rtpmap:98 VP9/90000 ↵a=rtcp-fb:98 goog-remb ↵a=rtcp-fb:98 transport-cc ↵a=rtcp-fb:98 ccm fir ↵a=rtcp-fb:98 nack ↵a=rtcp-fb:98 nack pli ↵a=fmtp:98 profile-id=0 ↵a=rtpmap:99 rtx/90000 ↵a=fmtp:99 apt=98 ↵a=rtpmap:100 VP9/90000 ↵a=rtcp-fb:100 goog-remb ↵a=rtcp-fb:100 transport-cc ↵a=rtcp-fb:100 ccm fir ↵a=rtcp-fb:100 nack ↵a=rtcp-fb:100 nack pli ↵a=fmtp:100 profile-id=2 ↵a=rtpmap:101 rtx/90000 ↵a=fmtp:101 apt=100 ↵a=rtpmap:127 red/90000 ↵a=rtpmap:124 rtx/90000 ↵a=fmtp:124 apt=127 ↵a=rtpmap:125 ulpfec/90000 ↵a=ssrc-group:FID 1775791746 3660473139 ↵a=ssrc:1775791746 cname:WtkW8YNkHu567ueR ↵a=ssrc:3660473139 cname:WtkW8YNkHu567ueR ↵" type: "answer"

codersneha3012 commented 4 years ago

Basically error 400 on remote-description API

yishengjiang99 commented 4 years ago

What if remove the timeout on the post remote connection answer, and just return an empty array when no ice can is found

codersneha3012 commented 4 years ago

Hi,

I am trying to setup stun/turn server on my AWS EC2 instance but I am getting the following error: The server stun:xx.xx.xx.xx:3478 returned an error with code=701: STUN server address is incompatible.

Can you suggest something?

codersneha3012 commented 4 years ago

Hi, waitUntilIceGatheringStateComplete in applyAnswer in webrtcconnection.js is never getting completed and hence it is throwing an error. Also why have you not created iceCandidate on client and added it on server. In peer to peer system it is also done.

What if remove the timeout on the post remote connection answer, and just return an empty array when no ice can is found - Also if I do this will it solve the issue that it is not getting any icecandidate.

those-times commented 4 years ago

Hello, does this fix work? You pass 'rtcIceServers' parameter in one instance of RTCPeerConnection and 'RTCIceServers' to another. RTCPeerConnection should take in 'iceServers' parameter.

yishengjiang99 commented 4 years ago

Hello, does this fix work? You pass 'rtcIceServers' parameter in one instance of RTCPeerConnection and 'RTCIceServers' to another. RTCPeerConnection should take in 'iceServers' parameter.

good eye. i fixed thqt one and deployed to https://v2.grepawk.com/record-audio-video-stream/index.html

and the audio/video is not working for me

markandrus commented 3 years ago

Sorry, I cannot accept this.