Closed mykola-mokhnach closed 5 years ago
I guess you're using full-trickle in Janus, and a more recent version of the adapter that I think our demos are still using? That might explain why the old "let's just pass null
" thing that always worked now maybe doesn't. I'll make the fix, thanks for the heads up :+1:
Fixed in https://github.com/meetecho/janus-gateway/commit/345cc5e107e12553f031d10cdbd554a3976ae7b6 (wrong commit message so this didn't close the issue automatically).
What version of the adapter are you using @mykola-mokhnach? I've got reports that this fix actually broke things for them, and I can confirm that when doing full-trickle I'm getting an exception as well:
Uncaught (in promise) TypeError: Failed to construct 'RTCIceCandidate': sdpMid and sdpMLineIndex are both null.
at RTCPeerConnection.r.RTCPeerConnection.<computed> (adapter.min.js:1)
at RTCPeerConnection.r.RTCPeerConnection.addIceCandidate (adapter.min.js:1)
at janus.js:2414
This is with adapter 6.4.0. Unless you give me a good reason, I'll have to change that again to null
.
It looks like different browsers handle it differently. In Firefox, for example, everything works smoothly, but Chrome and Safari are complaining about this line. It's such a mess %/
No, Firefox complains as well:
TypeError: Either sdpMid or sdpMLineIndex must be specified
Reverted for now, using a new variable that we can redifine later on to change behaviour if needed.
We are experiencing the following error in Chrome when sending the
watch
request to the streaming plugin:Quick search on the interned shows the problem might be in this part of
janus.js
codebase:The spec at https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/addIceCandidate#Example says end-of-candidates should be sent as
References: https://github.com/w3c/webrtc-pc/issues/1952#issuecomment-409976400 https://github.com/w3c/webrtc-pc/issues/2039