One to one video chat using Phoenix / Elixir / Sockets?

I want to develop a one to one video chat functionality between a) An Android based Smart TV or TV Box and b) Either a web application or an Android application (on smartphones).

My questions:

A) Is it possible to achieve this using direct communication between the two endpoints or is it a must to use a specialized cloud service like Agora (use their SDK and infrastructure)?

B) Is it a must to set up a server in between the two clients. If so, what are the functions this server would do? Is it a must to stream the video to the in between server which in turn serves it to the other endpoint?

C) Is it possible to stream the video using Phoenix channels?

D) Any experiences, real life examples?

In any case, I prefer a solution which does not involve any 3rd party providers or additional server setups.

Your ideas are invaluable.

1 Like

:wave:

A) Yes, check out webrtc. Some smart tvs might support it.

B) If webrtc is not supported, or the smart tvs can’t setup a direct connection, a server would act as a relay for the media packets.

C) It is possible, but since it’s tcp, and media is preferably streamed over udp, it would be a bad choice.

1 Like

I have set up a TURN server and followed the guide here:

It took some effort but it’s indeed WORKING !!

I am not sure I will be using my own TURN server, there are plenty of established platforms to make video calls but I learned new things :slight_smile: Learning is good as always.

Thanks @idi527, that was valuable.

1 Like

https://www.twilio.com/stun-turn might be interesting for you.

1 Like