ZastrixArundell

ZastrixArundell

I want to make a custom voice chat app, which approach should I take?

So, to explain how I actually want the voice chat application to behave:

A user logs in and is redirected to a page. There aren’t really any elements on that page except for a logout button and a couple of pictures. I don’t plan to put anything interactive for now. Now when the user does log in and enter the page, WebRTC will ask to use the microphone (I did all of this).

When the user does allow microphone usage, he will start broadcasting audio.

Now the actual behavior will be that when another user does login, the audio between them can only be heard if a condition is met (I use locations in an online game for said conditions). If a third user does log in and they’re at the margin distances than this’ll happen:

(User locations: A – B – C)

  • A will only hear B
  • B will hear A and C
  • C will only hear B
  • (again, just in case: A will not hear C)

Now I think I could just make one channel and let all of the users log in into that but I guess that it’ll be a problem when multiple users log in and they’ll start getting the data stream from each other even though they’ll never hear each other (user A and C example) so they’ll download unnecessary data.

I guess I could as well make a per-user-channel (sounds plausible) and then stream data (which could be created on the server’s side I guess?) but I don’t know how to actually implement that, or rather, should I.

I’ve never done anything with WebRTC and there’s a high probability that neither are correct.

Edit

I’m not really asking for spoon-fed code, just some recommendations/ideas and/or pointers.

Most Liked

tty

tty

I would start with MongooseIM, add Jingle and Otalk then wrap your Web frontend around it.

Just my 2 cents.

Where Next?

Popular in Questions Top

New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement