WebRTC远程视频元素无限加载
知道问题出在哪里吗?localVideo元素工作正常,但在这两台计算机中,对于remoteVideo元素,我得到的只是这个(无休止地循环/加载),带有WebRTC远程视频元素无限加载,webrtc,Webrtc,知道问题出在哪里吗?localVideo元素工作正常,但在这两台计算机中,对于remoteVideo元素,我得到的只是这个(无休止地循环/加载),带有 2=网络加载-浏览器正在下载数据 0=HAVE_NOTHING-无音频/视频是否准备就绪的信息 我检查了所有的东西: ✔️ 每个对等连接(pc)都有来自另一个对等方的报价或答复的正确的remoteSDP ✔️ 远程视频元素已 iceConnectionState: "new" Autoplay==true Mute
2=网络加载-浏览器正在下载数据
0=HAVE_NOTHING-无音频/视频是否准备就绪的信息
iceConnectionState: "new"
Autoplay==true
Muted==false
Paused==false
Disabled==false
iceConnectionState: "new"
iceConnectionState:“新建”
ICeColgatingState:“完成”
remoteVideoElement.srcObject=e.streams[0]代码>(由先前声明的
触发)pc1.addEventListener('track',gotRemoteStream);
remoteVideo.srcObject=pc1.getRemoteStreams()[0]代码>
console.log()
s:
报价人的活动处于正常状态⏪左边回答者的活动在右边⏩. @Answerer
表示消息正在发送给应答者
Offerer(pc1) . . . . . . . . . . . . Answerer(pc2)
``````````````````````````````````````````````````
Requesting local stream
Received local stream
Created local peer connection object pc1
Added local stream to pc1
pc1 createOffer start
-----------------2-----------------Offer, then SDP
2_____PC1_signalingState_____ stable
setLocalDescription complete
2.5_____PC1_signalingState_____ have-local-offer
--3--------------------------------
onOfferSendItToOtherPc()
. . . . . . . . . . . . . . . . . . message: @Answerer SDP-Offer:{"type":"offer","sdp":"v=0\r\no=- 1919269707352669653 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic: WMS 2qzHy5PolwyGALtwc39fuVJT4aGMaOdSJP8d......"}
-------------------------------4---
. . . . . . . . . . . . . . . . . . Requesting local stream
. . . . . . . . . . . . . . . . . . message: @Answerer ICE-Cand
. . . . . . . . . . . . . . . . . . message: @Answerer ICE-Cand
. . . . . . . . . . . . . . . . . . message: @Answerer ICE-Cand
. . . . . . . . . . . . . . . . . . message: @Answerer ICE-Cand
. . . . . . . . . . . . . . . . . . message: @Answerer ICE-Cand:null
. . . . . . . . . . . . . . . . . . Received local stream
. . . . . . . . . . . . . . . . . . Created local peer connection object pc2
. . . . . . . . . . . . . . . . . . Added local stream to pc2
❌PROBLEM HERE? (NO ANSWER YET!). . received remote stream
. . . . . . . . . . . . . . . . . . setRemoteDescription complete
. . . . . . . . . . . . . . . . . . 4.5_____PC2_signalingState_____ have-remote-offer
----------------------------5------
. . . . . . . . . . . . . . . . . . setLocalDescription complete
--------------------------------6--
. . .❗ ANSWER SENT HERE! . . . . . onAnswerSendItToOtherPc()
message: @Offerer SDP-Answer:{"type":"answer","sdp":"v=0\r\no=- 4846855406168784799 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic: WMS w2GnbUcp9SIA2ItZwAf9BIH9gBppgNJh4zju......"}
message: @Offerer ICE-Cand
pc1 received remote stream
setRemoteDescription complete
7. Answerer ==================== setRemoteDescription =======================
message: @Offerer ICE-Cand
message: @Offerer ICE-Cand:null
ICE似乎是可行的,因为每台电脑都有
iceConnectionState: "new"
如果ICE连接状态仍然是新的,则ICE不起作用
它仍然是新的,甚至没有检查,这表明没有远程ice候选者被添加到连接中。解释使用的方法chrome://webrtc-internals 去弄清楚为什么会这样
ICE似乎是可行的,因为每台电脑都有
iceConnectionState: "new"
如果ICE连接状态仍然是新的,则ICE不起作用
它仍然是新的,甚至没有检查,这表明没有远程ice候选者被添加到连接中。解释使用的方法chrome://webrtc-internals 想知道为什么会这样。谢谢你给我指明了正确的方向!经过多次斗争,我发现我的ICE错误在于,在SDP的任何一个报价确定之前,我试图添加涓流ICE候选人。谢谢你为我指明了正确的方向!经过多次斗争,我发现我的ICE错误在于,我试图在SDP的任何一个提议确定之前添加涓流ICE候选方案。