How to implement webRTC for iOS mobile app creatin

2019-08-02 20:15发布

问题:

I am developing an iOS Video application with webRTC, I have developed application for room video call as i got a demo named AppRTC.

But the problem is, we can connect if and only if we know the room name.

Any help and suggestion for creating 1-1 Video with webRTC.

Actually, i am not getting the proper way to create Signaling between two users. I want to develop video call like Whatsapp,facebook and Hangout one to one video call.

I have followed this AppRTC Demo Code On GitHub demo code.

Thanks in advanced

回答1:

You can implement a WhatsApp-style video call between two users using the "room" approach behind the scenes.

  • Let's say that User 1 wants to call User 2.
  • The app running on User 1's device generates a random room name and joins that room.
  • User 1's app also communicates the room name to User 2's device.
  • The app on User 2's device shows an incoming call alert.
  • If User 2 taps the Answer button, the app joins the room and the call with User 1 starts.
  • The actual room name used for the call doesn't need to be shown to any of the users.


回答2:

If you want to create 1 to 1 video call you should build your own signaling mechanism. What I mean by signaling mechanism is basically sending SDPs to each other.

You can find some useful info here