VoIP videoconference IOS App, Open WebRTC


My application you can download it HERE: https://www.dropbox.com/sh/f74br70w7ziwtbn/AAAZ9FHakrZT9FeSb01MyrZ1a?dl=0




 In this post I will show my work on WebRTC, an open project that provides browsers, embedded and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. With OpenWebRTC you can build native WebRTC apps that communicate with browsers that supports the WebRTC standard, such as Chrome, Firefox and Bowser. OpenWebRTC is especially focused on mobile platforms, with powerful features such as hardware accelerated video coding and OpenGL-based video rendering. Sounds fancy right? Yes, it does. But why choosing WebRTC to do VoIP over, lets say, other existent signalling (like SIP or skype) and encoding technologies (just like H264, H323, V8, etc...)? For me, the answer was simply: Copyright issues. So, I wanted to develop an IOS app for my Iphone 6, brand new IOS 9 (not the preview version already), and that meant that I could not use code covered by the GPL licensing.


That is right. GPL licensing allows you to freely use and redistribute the code, but it does not allow you to pose further restrictions while doing so. Sadly, Apple App store does, REGARDLESS of it being paid or free. WebRTC is distributed with a BSD licensing, meaning that you can do whatever you like with it, for as long as you put the due disclaimer in your code. So, currently you can choose one out of two possible implementations for WebRTC: WebRTC from Google, and OpenWebRTC from Ericsson (Germany). Both do almost the same, but I prefer the OpenWebRTC due to the fact that I want to develop for mobile. Quick comparison can be found at (https://bloggeek.me/ericssons-openwebrtc-project/): 

WebRTC vs. OpenWebRTC


Therefore, I am using OpenWebRTC as a choice. I followed the official tutorials to build a native IOS application (you can build a hybrid one, meaning the use of a brower view inside an app), and there are other tutorials for other platforms just like Android:




The app I developed is based on the Original Native app from the OpenWebRTC available here (https://github.com/EricssonResearch/openwebrtc-examples/tree/master/ios/NativeDemo). What I did in this application was creating a XCode project with all the dependencies solved (you do not need CocoaPods to run it), and I solved most of the problems to run in in IOS 9 (it does compile for previous versions like IOS 8, with extra warnings naturally). 


So, The Portrait view that is buggy from the NativeDemo app from OpenWebRTC is:




Portrait, after fixing the error, as well as Landscape:





As you can see, in Portrait is not perfect, but the video is stretched to meet the box. As the pull I did through CocoaPods grabbed the compiled binaries from OpenWebRTC and OpenWebRTC-SDK, I could not edit the video feed itself. For that, I would have to build the application from scratch and build the OpenWebRTC source files (wasting almost 10 hours of my life! Trust me, I did it). So the solution I found was manipulating the view itself, through rotations and translations and scaling. Though, in Landscape mode, it works better.

The application was tested by the following demo: http://demo.openwebrtc.org:38080 





Then, you have to select the same id in the application and in the demo in the browser.



At the server side, once the connection is established in the same room, you can see as follows:





and in Landscape as well. You can see the server updated the orientation of the video properly:


Published by fxsf às 14:21