rudminda
rudminda

Reputation: 147

WebRTC remoteVideo Element endlessly loading

Any idea where the problem might be? The localVideo element works fine, but all I get, in both computers, for the remoteVideo element, is this (endlessly circling/loading), with...

enter image description here

enter image description here I've checked everything:

✔️ Each Peer-Connection (pc) has the correct remoteSDP that came from the other Peer's Offer-or-Answer.

✔️ The remoteVideo element has . . .

✔️ ICE seemed to work out, because each PC has . . .

✔️ The last command in my code is . . .

✔️ Nothing happens when I open up the console, and try to manually attach the PC's remoteStream to the video element, like this:

Here below are my two combined console.log()s:

The Offerer's activity is on the ⏪left; the Answerer's activity is on the right⏩. @Answerer means the message is being sent TO the 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

Upvotes: 0

Views: 248

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17265

ICE seemed to work out, because each PC has . . .

iceConnectionState: "new"

If iceConnectionState is still new then ICE did not work.

That it is still new and not even checking suggests no remote ice candidates have been added to the connection. This blog post explains the methodology of using chrome://webrtc-internals to figure out why that happens.

Upvotes: 2

Related Questions