Android和ios设备之间的apprtc

问题描述 投票:2回答:2

我尝试在Android浏览器和ios浏览器之间进行视频聊天并加入房间https://appr.tc/r/123,它不起作用。

iPhone6:11.3.1 safari浏览器。它表明了这一点

setRemoteDescription: 
OperationError:Failed to set remote answer sdp: Session error code: ERROR_CONTENT.
Session error description: Failed to set remote video description send parameters..

Android:Chrome浏览器。它表明了这一点

  setRemoteDescription: OperationError:Failed to set remote offer sdp: Session error code: ERROR_CONTENT. 
Session error description: Failed to set remote video description send parameters..
  setLocalDescription: OperationError:Failed to set local sdp: Session error code: ERROR_CONTENT. 
Session error description: Failed to set remote video description send parameters..

我看了这个问题,并且有一个回复,Safari不支持V8,但我试图通过android-iPhone视频聊天并加入https://appr.tc/r/123?vrc=H264&vsc=H264,它不起作用。所以,我认为还有其他原因。

这是我在Safari上提供的sdp:

{"sdp":"v=0
o=- 3891624909652035977 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS a4985af4-717f-43c8-b46f-a850869d52b5
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:FDCl
a=ice-pwd:p1ZLrjO7JWv+N7vH5MtOilnQ
a=ice-options:trickle
a=fingerprint:sha-256 1F:D4:A8:79:22:E0:3C:C6:EC:F6:AB:80:E7:02:C1:0D:F2:D7:17:07:78:6F:A7:A2:BB:8E:72:1A:1C:66:D2:7D
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:157600064 cname:j6Fj3mmvkmnZnw6s
a=ssrc:157600064 msid:a4985af4-717f-43c8-b46f-a850869d52b5 8bbb2424-4b24-4fac-9060-f04a68cca9ec
a=ssrc:157600064 mslabel:a4985af4-717f-43c8-b46f-a850869d52b5
a=ssrc:157600064 label:8bbb2424-4b24-4fac-9060-f04a68cca9ec
m=video 9 UDP/TLS/RTP/SAVPF 96 98 99 97 100
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:FDCl
a=ice-pwd:p1ZLrjO7JWv+N7vH5MtOilnQ
a=ice-options:trickle
a=fingerprint:sha-256 1F:D4:A8:79:22:E0:3C:C6:EC:F6:AB:80:E7:02:C1:0D:F2:D7:17:07:78:6F:A7:A2:BB:8E:72:1A:1C:66:D2:7D
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 red/90000
a=rtpmap:98 ulpfec/90000
a=rtpmap:99 H264/90000
a=rtcp-fb:99 ccm fir
a=rtcp-fb:99 nack
a=rtcp-fb:99 nack pli
a=rtcp-fb:99 goog-remb
a=rtcp-fb:99 transport-cc
a=fmtp:99 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:100 rtx/90000
a=fmtp:100 apt=99
a=ssrc-group:FID 1538571626 1764459383
a=ssrc:1538571626 cname:j6Fj3mmvkmnZnw6s
a=ssrc:1538571626 msid:a4985af4-717f-43c8-b46f-a850869d52b5 11d3b14a-ea93-4850-80c5-434dee01ff06
a=ssrc:1538571626 mslabel:a4985af4-717f-43c8-b46f-a850869d52b5
a=ssrc:1538571626 label:11d3b14a-ea93-4850-80c5-434dee01ff06
a=ssrc:1764459383 cname:j6Fj3mmvkmnZnw6s
a=ssrc:1764459383 msid:a4985af4-717f-43c8-b46f-a850869d52b5 11d3b14a-ea93-4850-80c5-434dee01ff06
a=ssrc:1764459383 mslabel:a4985af4-717f-43c8-b46f-a850869d52b5
a=ssrc:1764459383 label:11d3b14a-ea93-4850-80c5-434dee01ff06
","type":"offer"}
android ios webrtc apprtc
2个回答
0
投票

Safari不支持VP8,Android不支持H264,因此无法建立视频会话。


0
投票

你应该设置一个解码器和编码器如下

final PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();
final DefaultVideoEncoderFactory encoderFactory = new DefaultVideoEncoderFactory(eglBase.getEglBaseContext(), true, true);
final DefaultVideoDecoderFactory decoderFactory = new DefaultVideoDecoderFactory(eglBase.getEglBaseContext());
peerConnectionFactory = PeerConnectionFactory.builder().setOptions(options).
                setVideoDecoderFactory(decoderFactory).
                setVideoEncoderFactory(encoderFactory).
                createPeerConnectionFactory();
© www.soinside.com 2019 - 2024. All rights reserved.