tkmn0 / SimpleWebRTCExample_iOS

Simple example for WebRTC on iOS written in swift5
MIT License
182 stars 49 forks source link

can this example run multiples devices at once ? #23

Closed guns28 closed 4 years ago

guns28 commented 4 years ago

Hi , thank you for this project it saved me a lot of time, i'm trying to run the example on 3 iphones to make a streaming but there only 2 that can communicate at the same time, can we make an update to make it like a chat room where they all connect to the same room to chat ? if you just can confirm me and just give me an idea i'm still reading and trying to understand the code and how the whole application is working. Best regards

tkmn0 commented 4 years ago

Hi, I'm glad to hear this project is somehow helpful for you.

Currently, this project can establish only peer to peer connection( totally, 2 devices ).

can we make an update to make it like a chat room where they all connect to the same room to chat ?

Sounds good :) I think there are two way to create like a chat room.

  1. Full mesh connection way (only needs signaling server)
  2. SFU (Selecting Forward Unit) connection way (needs signaling and media server)

If you are not familiar with those ways, see here.

I have another example for sfu server (here). I think the first way is easy but high performance will be needed in client side, and I think the second way is good for client but it needs to maintain server side.

tkmn0 commented 4 years ago

I think the first one I mean, full-mesh way is better for this repository. If I could run a simple full-mesh signaling server on heroku, it will be helpful for developers :)

guns28 commented 4 years ago

Thank you for your response i will check it and get back to you if i need any help if you don't mind. best

guns28 commented 4 years ago

Do you have any useful link that helped you write this code i need to understand it more so i can handle the changes. thx

tkmn0 commented 4 years ago

Do you have any useful link that helped you write this code

In addition, I think webrtc connection flow is same for each platforms(web, android, ios, c++). So, some examples written in other languages are also helpful :) (The api is similar too).

guns28 commented 4 years ago

thx man , all my respect.