elixir-webrtc/ex_webrtc

`echo` example not working

Closed this issue ยท 12 comments

Disclaimer: I am a total noob to all of this RTC stuff.

Trying to run the echo example as follows:

  1. clone the repo
  2. cd examples/echo
  3. mix deps.get
  4. mix run --no-halt
  5. visit http://127.0.0.1:8829/index.html

Tried in Chrome, Firefox and Edge, same problem in all 3.

I granted permissions to access camera and mic.

The audio echo happens but the video feed remains a spinning circle.

image

There are some iex warnings that look like this:

20:32:30.005 [warning] Couldn't unmarshal candidate, reason: {:resolve_address, :timeout}.
Candidate: 3628365797 1 udp 21119237711 ec0f1d22-9b65-4a49-b551-519de7728992.local 54253 typ host generation 0 ufrag dItk network-cost 999

When hacking on this stuff, do the maintainers have a preferred browser?

lang versions:

elixir 1.16.1-otp-26
erlang 26.1.2

This might be an obvious thing to do, but have you tried refreshing the page and waiting for a few seconds? From my experience, sometimes the browser does not seem to produce/receive the keyframe on the first try and the example does not implement any PLI forwarding, but it was generally quite rare and a simple refresh was solving the issue.

If that does not help, can you share logs from the browser console (preferably Chrome)? Especially the Send SDP offer... and Received SDP answer... logs (similar logs should be also printed by the elixir app, I'm interested in the "sdp" field with a very long string.

Also, please share your OS and version of Chrome (three dots in the top-right cornet -> About Chrome/Chromium -> Version ...). Judging by the fact that you've tested on Edge, I suppose you're using Windows (which we did not test on basically at all, so this might be an issue, but more so that browsers under Windows do something weird that we did not account for).

We generally develop using Chromium, although it should work fine on any Chromium-based browser, Firefox and Safari.

How do I "refresh" the page?

I'm joking! Yes, I refreshed the page many times.

Sure, I will gather some logs tomorrow when I try running it again.

I am not certain how identifiable some of the log output is. Some things look like MAC addresses, which I would rather not post publicly. Where can I send these logs that is private? An email would be good.

There's nothing that I would consider long-term confidential in the SDP (maybe the IP addresses in the ICE candidates, but the initial offer/answer should not contain these, no MAC addresses, that's for sure), but if you wish so, send it over to lukaszwala@swmansion.com. What about the OS and Chrome version? I might be able to reproduce the issue myself, but I have to know these.

I sent the log output just now.

I forgot to mention I am using WSL so that might be a factor (maybe http networking is constrained somehow).

It seems like, after all, dots do matter in Gmail addresses if using through organization (like the address I gave you above), could you send it once again to lukasz.wala@swmansion.com? Sorry for the confusion.

Hi @peaceful-james,

SDP offer/answer that you send seem to be correct.

Could you please send us also debug logs? You can configure them here I belive that your ICE connection is established but just to make sure.

Can you try to run send_from_file example? It contains keyframes every x seconds - just to eliminate the problem with a keyframe.

You can also go under chrome://webrtc-internals and check your RTPInboundStream - do you see that you receive any data?

Hi @peaceful-james,
any progress on that?

I have not looked at it for a while. I will not have time for a few days.

Hi @peaceful-james,
we introduced some changes in examples in #133. Could you please test them? If examples still don't work, please reopen this issue! ๐Ÿ™‚

@mickel8 No problem. I got distracted by other stuff and have not tried this since I first posted the issue. Wise to close it. ๐Ÿ‘๐Ÿป

I will try again soon.