elixir-webrtc / ex_webrtc

An Elixir implementation of the W3C WebRTC API
Apache License 2.0
363 stars 14 forks source link

Unable to apply answer with disabled mlines #144

Closed sgfn closed 3 months ago

sgfn commented 3 months ago

When joining Nexus from Chrome running on Android on a device which doesn't support a H264 encoder, the generated answer returned the following error from the PeerConnection.set_remote_description call, even though the relevant mline is disabled and can safely be ignored

Error (sdp_utils.ex:390)

{:error, :conflicting_ice_credentials}

Version

ex_webrtc at v0.3.0-af1fec4

Offer

v=0
o=- 8698819056612714 0 IN IP4 127.0.0.1
s=-
t=0 0
a=ice-options:trickle
a=group:BUNDLE 0 1 2 3
a=extmap-allow-mixed
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=recvonly
a=mid:0
a=ice-ufrag:xQcm
a=ice-pwd:0A9TU2CSTqk9gFUWzVLzHQ==
a=ice-options:trickle
a=fingerprint:sha-256 C4:48:0D:43:CF:04:83:4A:2D:52:46:47:CE:43:86:7D:D5:E0:77:01:39:3E:2F:86:45:96:D6:81:C1:ED:93:A1
a=setup:actpass
a=rtcp-mux
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=rtpmap:96 H264/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=recvonly
a=mid:1
a=ice-ufrag:xQcm
a=ice-pwd:0A9TU2CSTqk9gFUWzVLzHQ==
a=ice-options:trickle
a=fingerprint:sha-256 C4:48:0D:43:CF:04:83:4A:2D:52:46:47:CE:43:86:7D:D5:E0:77:01:39:3E:2F:86:45:96:D6:81:C1:ED:93:A1
a=setup:actpass
a=rtcp-mux
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=sendonly
a=mid:2
a=ice-ufrag:xQcm
a=ice-pwd:0A9TU2CSTqk9gFUWzVLzHQ==
a=ice-options:trickle
a=fingerprint:sha-256 C4:48:0D:43:CF:04:83:4A:2D:52:46:47:CE:43:86:7D:D5:E0:77:01:39:3E:2F:86:45:96:D6:81:C1:ED:93:A1
a=setup:actpass
a=rtcp-mux
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=msid:2PKWCLDDEA32RYN6PRXAZER2LO7GXISG 7830667855493042488705330358
a=rtpmap:96 H264/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=sendonly
a=mid:3
a=ice-ufrag:xQcm
a=ice-pwd:0A9TU2CSTqk9gFUWzVLzHQ==
a=ice-options:trickle
a=fingerprint:sha-256 C4:48:0D:43:CF:04:83:4A:2D:52:46:47:CE:43:86:7D:D5:E0:77:01:39:3E:2F:86:45:96:D6:81:C1:ED:93:A1
a=setup:actpass
a=rtcp-mux
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=msid:2PKWCLDDEA32RYN6PRXAZER2LO7GXISG 31346526471764189041775500024
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc

Answer

v=0
o=- 746843328313393782 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 1 2 3
a=extmap-allow-mixed
a=msid-semantic: WMS
m=video 0 UDP/TLS/RTP/SAVPF 0
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:oIRa
a=ice-pwd:10rPa8NrMCm602mt1OVkUHJs
a=ice-options:trickle
a=fingerprint:sha-256 D1:3D:C3:D3:A5:2C:94:F5:B8:8B:EC:C9:35:03:7D:C0:4C:FA:E5:D4:8F:9D:F2:2C:9B:65:3B:4C:6C:AD:FA:53
a=setup:active
a=mid:0
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendonly
a=msid:- c3357bda-9a57-457d-8f74-3f76cb714820
a=rtcp-mux
a=ssrc:3278616542 cname:/G6kWKO/WAu7B5XE
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:v2lJ
a=ice-pwd:YAx6oiSskdwAfTG30KYyxARg
a=ice-options:trickle
a=fingerprint:sha-256 D1:3D:C3:D3:A5:2C:94:F5:B8:8B:EC:C9:35:03:7D:C0:4C:FA:E5:D4:8F:9D:F2:2C:9B:65:3B:4C:6C:AD:FA:53
a=setup:active
a=mid:1
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendonly
a=msid:- 3290ef71-954e-4e0e-9351-1273629978f8
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=ssrc:575491128 cname:/G6kWKO/WAu7B5XE
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:v2lJ
a=ice-pwd:YAx6oiSskdwAfTG30KYyxARg
a=ice-options:trickle
a=fingerprint:sha-256 D1:3D:C3:D3:A5:2C:94:F5:B8:8B:EC:C9:35:03:7D:C0:4C:FA:E5:D4:8F:9D:F2:2C:9B:65:3B:4C:6C:AD:FA:53
a=setup:active
a=mid:2
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtpmap:96 H264/90000
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:v2lJ
a=ice-pwd:YAx6oiSskdwAfTG30KYyxARg
a=ice-options:trickle
a=fingerprint:sha-256 D1:3D:C3:D3:A5:2C:94:F5:B8:8B:EC:C9:35:03:7D:C0:4C:FA:E5:D4:8F:9D:F2:2C:9B:65:3B:4C:6C:AD:FA:53
a=setup:active
a=mid:3
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1