简体   繁体   English

如何为iOS移动应用程序实现webRTC,以创建一对一通话(视频和音频)?

[英]How to implement webRTC for iOS mobile app creating 1 to 1 Call (Video and Audio)?

I am developing an iOS Video application with webRTC, I have developed application for room video call as i got a demo named AppRTC. 我正在使用webRTC开发一个iOS Video应用程序,由于得到了名为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. 使用webRTC创建1-1视频的任何帮助和建议。

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. 我想开发视频通话,例如Whatsapp,facebook和环聊一对一视频通话。

I have followed this AppRTC Demo Code On GitHub demo code. 在GitHub上遵循了AppRTC演示代码。

Thanks in advanced 提前致谢

If you want to create 1 to 1 video call you should build your own signaling mechanism. 如果要创建1对1的视频通话,则应建立自己的信令机制。 What I mean by signaling mechanism is basically sending SDPs to each other. 我所说的信令机制基本上是互相发送SDP。

You can find some useful info here 您可以在这里找到一些有用的信息

You can implement a WhatsApp-style video call between two users using the "room" approach behind the scenes. 您可以使用幕后的“会议室”方法在两个用户之间实施WhatsApp风格的视频通话。

  • Let's say that User 1 wants to call User 2. 假设用户1要呼叫用户2。
  • The app running on User 1's device generates a random room name and joins that room. 在用户1的设备上运行的应用会生成一个随机的房间名称并加入该房间。
  • User 1's app also communicates the room name to User 2's device. 用户1的应用程序还将房间名称传达给用户2的设备。
  • The app on User 2's device shows an incoming call alert. 用户2的设备上的应用程序显示来电警报。
  • If User 2 taps the Answer button, the app joins the room and the call with User 1 starts. 如果用户2轻按“接听”按钮,则该应用将加入会议室,并开始与用户1进行呼叫。
  • The actual room name used for the call doesn't need to be shown to any of the users. 不需要将用于呼叫的实际房间名称显示给任何用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM