haiyangwu / mediasoup-client-android

mediasoup android client side library https://mediasoup.org
MIT License
179 stars 107 forks source link

关于web端刷新重新加入房间,android端sdp设置失败的问题 #4

Closed newchenyu closed 4 years ago

newchenyu commented 4 years ago

大佬,你好! 使用你的工程出现一个问题,希望可以指点一下。正常情况下没有问题,android端和web可以互通。但是web退出会议重新加入或者刷新重新加入房间的时候出现问题,Android端只有web端的声音无画面。日志里面报 E/mediasoupclient-jni: [ERROR] transport_jni::Java_org_mediasoup_droid_RecvTransport_nativeConsume() | Failed to set local answer sdp: Failed to process the bundled m= section. 还有 E/mediasoupclient-jni: [ERROR] transport_jni::Java_org_mediasoup_droid_RecvTransport_nativeConsume() | Session error code: ERROR_CONTENT. Session error description: Failed to process the bundled m= section..

以下是sdp以及报错详细信息

第一个offer和answer

D/mediasoupclient-jni: [DEBUG] Handler::Receive() | calling pc->setRemoteDescription() [offer:v=0 o=libmediasoupclient 10000 5 IN IP4 0.0.0.0 s=- t=0 0 a=ice-lite a=fingerprint:sha-512 EF:6C:D2:47:29:5B:FB:F7:10:5D:54:81:94:EB:26:22:98:8C:2F:D4:C4:16:24:2D:A1:5C:54:53:C3:18:EC:FC:FA:81:7B:FC:42:F9:DE:F7:D3:9C:9C:69:41:E2:6A:0E:5F:67:86:5F:A4:7C:DA:CE:7E:DC:5B:A9:44:62:47:E3 a=msid-semantic: WMS * a=group:BUNDLE 0 1 2 m=audio 7 UDP/TLS/RTP/SAVPF 100 c=IN IP4 127.0.0.1 a=rtpmap:100 opus/48000/2 a=fmtp:100 minptime=10;sprop-stereo=1;usedtx=1;useinbandfec=1 a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=setup:actpass a=mid:0 a=sendonly a=ice-ufrag:yculefwrjzikrqsp a=ice-pwd:rxzafcxw4ozdwzdqoacz4h6plt0ehcij a=candidate:udpcandidate 1 udp 1076558079 58.216.33.253 46408 typ host a=candidate:tcpcandidate 1 tcp 1076302079 58.216.33.253 42357 typ host tcptype passive a=end-of-candidates a=ice-options:renomination a=ssrc:200479048 cname:hz I/mediasoupclient-jni: [TRACE] PeerConnection::SetRemoteDescription() I/mediasoupclient-jni: [TRACE] PeerConnection::OnSignalingChange() D/mediasoupclient-jni: [DEBUG] PeerConnection::OnSignalingChange() | new SignalingState:[have-remote-offer] I/mediasoupclient-jni: [TRACE] PeerConnection::OnTrack() [TRACE] PeerConnection::OnAddTrack() [TRACE] PeerConnection::OnAddStream() D/RoomClient: recvTransport::onConnectionStateChange newState=disconnected I/mediasoupclient-jni: [TRACE] PeerConnection::OnIceGatheringChange() D/mediasoupclient-jni: [DEBUG] PeerConnection::OnIceGatheringChange() | new IceGatheringState:[gathering] I/mediasoupclient-jni: [TRACE] PeerConnection::CreateAnswer() I/mediasoupclient-jni: [TRACE] Sdp::Utils::applyCodecParameters() D/mediasoupclient-jni: [DEBUG] Handler::Receive() | calling pc->SetLocalDescription() [answer:v=0 o=- 2106674388572859380 6 IN IP4 127.0.0.1 s=- t=0 0 a=msid-semantic: WMS a=group:BUNDLE 0 1 2 m=audio 52560 UDP/TLS/RTP/SAVPF 100 c=IN IP4 192.168.18.245 a=rtpmap:100 opus/48000/2 a=fmtp:100 minptime=10;useinbandfec=1 a=rtcp:9 IN IP4 0.0.0.0 a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=setup:active a=mid:0 a=recvonly a=ice-ufrag:Ei19 a=ice-pwd:tIyFyG6FIsMb8opbbZMpGWNK a=fingerprint:sha-256 FD:DE:72:02:57:99:75:4F:76:DF:AF:5D:EC:8D:BF:CB:B2:49:64:4D:FA:ED:61:E4:18:9C:7A:6D:F8:7B:2B:E2 a=candidate:3696260944 1 udp 2122260223 192.168.18.245 52560 typ host generation 0 network-id 3 network-cost 10 a=ice-options:trickle a=rtcp-mux m=video 9 UDP/TLS/RTP/SAVPF 101 102 c=IN IP4 0.0.0.0 a=rtpmap:101 VP8/90000 a=rtpmap:102 rtx/90000 a=fmtp:102 apt=101 a=rtcp:9 IN IP4 0.0.0.0 a=rtcp-fb:101 goog-remb a=rtcp-fb:101 ccm fir a=rtcp-fb:101 nack a=rtcp-fb:101 nack pli a=extmap:12 urn:ietf:params:rtp-hdrext I/mediasoupclient-jni: [TRACE] PeerConnection::SetLocalDescription() W/mediasoupclient-jni: [WARN] PeerConnection::OnFailure() | webtc::SetSessionDescriptionObserver failure [INTERNAL_ERROR:Failed to set local answer sdp: Failed to process the bundled m= section.] E/mediasoupclient-jni: [ERROR] transport_jni::Java_org_mediasoup_droid_RecvTransport_nativeConsume() | Failed to set local answer sdp: Failed to process the bundled m= section.

第二个offer(没有answer,安卓端无视频有音频)

D/mediasoupclient-jni: [DEBUG] Handler::Receive() | calling pc->setRemoteDescription() [offer:v=0 o=libmediasoupclient 10000 6 IN IP4 0.0.0.0 s=- t=0 0 a=ice-lite a=fingerprint:sha-512 EF:6C:D2:47:29:5B:FB:F7:10:5D:54:81:94:EB:26:22:98:8C:2F:D4:C4:16:24:2D:A1:5C:54:53:C3:18:EC:FC:FA:81:7B:FC:42:F9:DE:F7:D3:9C:9C:69:41:E2:6A:0E:5F:67:86:5F:A4:7C:DA:CE:7E:DC:5B:A9:44:62:47:E3 a=msid-semantic: WMS * a=group:BUNDLE 0 1 2 2 m=audio 7 UDP/TLS/RTP/SAVPF 100 c=IN IP4 127.0.0.1 a=rtpmap:100 opus/48000/2 a=fmtp:100 minptime=10;sprop-stereo=1;usedtx=1;useinbandfec=1 a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=setup:actpass a=mid:0 a=sendonly a=ice-ufrag:yculefwrjzikrqsp a=ice-pwd:rxzafcxw4ozdwzdqoacz4h6plt0ehcij a=candidate:udpcandidate 1 udp 1076558079 58.216.33.253 46408 typ host a=candidate:tcpcandidate 1 tcp 1076302079 58.216.33.253 42357 typ host tcptype passive a=end-of-candidates a=ice-options:renomination a=ssrc:200479048 cname: I/mediasoupclient-jni: [TRACE] PeerConnection::SetRemoteDescription() W/mediasoupclient-jni: [WARN] PeerConnection::OnFailure() | webtc::SetSessionDescriptionObserver failure [INTERNAL_ERROR:Session error code: ERROR_CONTENT. Session error description: Failed to process the bundled m= section..] E/mediasoupclient-jni: [ERROR] transport_jni::Java_org_mediasoup_droid_RecvTransport_nativeConsume() | Session error code: ERROR_CONTENT. Session error description: Failed to process the bundled m= section..

ethand91 commented 4 years ago

https://mediasoup.discourse.group/t/create-server-side-consumers-with-paused-true/244

haiyangwu commented 4 years ago

@newchenyu 可按照 doc 修改代码