Is it possible to develop native apps using prebuilt webrtc library instead of using source code?

1,637 views
Skip to first unread message

Lisen Mu

unread,
Jan 26, 2016, 9:24:54 PM1/26/16
to discuss-webrtc
Hi,

Currently I'm developing embeded apps using webrtc, however the only way I can find on how to do this from webrtc.org is to build my source together with webrtc's source code, using webrtc's gyp/ninja build system.

Is there any way I can get a "installed" version of webrtc, which is .so/.a and a clear set of corresponding .h files, to rely on in my project, like other open source libraries? So I can choose whichever build tool I like, cmake etc.

Thanks,



Ray Wang

unread,
Jan 28, 2016, 2:25:49 AM1/28/16
to discuss-webrtc
Of course. ninja built every module into static libraries. Just include the header file you want use.

在 2016年1月27日星期三 UTC+8上午10:24:54,Lisen Mu写道:

Cody Barnes

unread,
Jan 28, 2016, 11:04:39 PM1/28/16
to discuss-webrtc
If I may speak for Lisen Mu, I think the question is along the lines of why there is no way to download a pre-compiled binary for the various popular platforms as is available for many other open source libraries. It's a fair question. I've very much enjoyed getting into the native source. However just downloading the +9GB of source and compiling it has eaten up a considerable amount of development time on my own projects. To be honest, I wouldn't expect a prebuild library compiled with the /cli option set with the VS2015 compiler as I would need. Although I suspect that the population that has used the native client have done so for use with one of the 5 to 7 most common platforms.

Lisen Mu

unread,
Jan 29, 2016, 2:04:04 AM1/29/16
to discuss-webrtc
Thanks @Ray and @Cody, 

I might not make myself clear about this, downloading and compiling is time consuming indeed, however I still have a problem 'including the header file you want use.' quoted from @Ray.

for example, according to https://webrtc.org/native-code/native-apis/ I can use PeerConnectionFactory. To get my following code compiled:

webrtc::PeerConnectionFactory* factory = NULL;


I need to #include "talk/app/webrtc/peerconnectionfactory.h" , which implicitly includes a whole lot of other files:

"talk/app/webrtc/datachannelinterface.h"
"talk/app/webrtc/dtlsidentitystore.h"
"talk/app/webrtc/dtmfsenderinterface.h"
"talk/app/webrtc/jsep.h"
"talk/app/webrtc/mediacontroller.h"
"talk/app/webrtc/mediastreaminterface.h"
"talk/app/webrtc/peerconnectionfactory.h"
"talk/app/webrtc/peerconnectioninterface.h"
"talk/app/webrtc/rtpreceiverinterface.h"
"talk/app/webrtc/rtpsenderinterface.h"
"talk/app/webrtc/statstypes.h"
"talk/app/webrtc/umametrics.h"
"talk/session/media/channelmanager.h"
"webrtc/base/atomicops.h"
"webrtc/base/basictypes.h"
"webrtc/base/buffer.h"
"webrtc/base/constructormagic.h"
"webrtc/base/criticalsection.h"
"webrtc/base/event.h"
"webrtc/base/fileutils.h"
"webrtc/base/messagedigest.h"
"webrtc/base/messagehandler.h"
"webrtc/base/messagequeue.h"
"webrtc/base/network.h"
"webrtc/base/refcount.h"
"webrtc/base/rtccertificate.h"
"webrtc/base/scoped_ptr.h"
"webrtc/base/scoped_ref_ptr.h"
"webrtc/base/sigslot.h"
"webrtc/base/socketaddress.h"
"webrtc/base/socketfactory.h"
"webrtc/base/socketserver.h"
"webrtc/base/sslidentity.h"
"webrtc/base/sslstreamadapter.h"
"webrtc/base/thread.h"
"webrtc/base/timeutils.h" 

which is not the complete set yet, which means more macro definitions & compiler switches I need to take care of. So even I get my webrtc compiled I still feel not easy to simply copy a library file and a bunch of header files I need into my project's ./thirdparty directory and start coding at once.

And the easiest way to avoid this problem is using webrtc's own build system to get dependencies right to build my code. any suggestions? 

Thanks,

Cody Barnes

unread,
Jan 29, 2016, 7:32:04 PM1/29/16
to discuss-webrtc
Agreed. Deriving the minimal set of header files, libraries to import and compiler definitions is difficult enough, but maintaining those dependencies in my own projects has been an even greater challenge. Although you can start with the library import list and definitions from the demo client project, there is seems to be quite a bit extra that is not necessary (or conflicting) and has been added through boilerplate build settings. Even with those "extras", that is a base that can be fairly well relied upon. However it would indeed be nice if that were all wrapped up into a more manageable library or package of libraries.  Is anyone aware if something like this is on the road-map?

Ray Wang

unread,
Jan 31, 2016, 8:13:12 PM1/31/16
to discuss-webrtc
Yes,there's no "standalone" header file which could include all functionalities.
I think you need to write a wrapper file depends on what functionalities you want.
I have considered opensource my wrapper file , but i gave it up, because i am not sure whether
there is people who need the same functionalities as i did.

在 2016年1月29日星期五 UTC+8下午3:04:04,Lisen Mu写道:

Lisen Mu

unread,
Feb 1, 2016, 11:05:48 PM2/1/16
to discuss-webrtc
Thanks again, that's basically also what I'm doing right now.

I do understand if the priority of WebRTC team is to adopt webrtc into more browsers. 

However, more smart devices and gadgets are adding cameras as their main/supplementary feature, http://www.cnet.com/ces/ to find a few.

So I wonder if WebRTC team could take some time to polish native development experience it would be very nice.

Thanks, 

radioman . lt

unread,
Feb 3, 2016, 9:50:29 AM2/3/16
to discuss-webrtc
check "WebRTC for C# & C++/CLI" https://github.com/radioman/WebRtc.NET

builds in seconds, easy debug, demo included, prebuild libs/headers/dlls included for vs2015

Lisen Mu

unread,
Feb 5, 2016, 10:31:11 PM2/5/16
to discuss-webrtc
Thanks, great work!

Robert Peterson

unread,
May 2, 2016, 7:20:11 AM5/2/16
to discuss-webrtc
Reviving this thread as I don't think the issue was addressed.

I'm trying to develop an iOS WebRTC app and would like to know if a prebuilt static library such as libwebrtc_arm64.a is a available for download somewhere?

Cross-post with stackoverflow:

I've used the WebRTC DataConnection API in browsers a lot for p2p communication. Now I'd like to do the same within an iOS app.


I live and develop in a remote region with very slow Internet access. So building the webrtc sourcemyself which involves a 6+ GB download to generate the static library is very difficult. I attempted from a different location and because of the complexity of the build process failed and ran out of time to debug.


I found the libjingle_peerconnection cocoa pod, but the static library this provides is over 70MB. That exceed my understanding of the Apple store app binary size limit of 60MB. I'm wondering if it includes libjingle and webrtc video (I just want to use RTCDataChannels) code that isn't necessary?


I just need an arm64 library. Any generous souls out there willing to host a static library they have recently built?

I don't understand why this process is so painful. Why doesn't the webrtc.org do regular builds and host the output - especially for iOS

Faraz Khan

unread,
May 2, 2016, 8:05:46 PM5/2/16
to discuss-webrtc
Robert,
I'm not sure if a pre-built app is available but its extremely easy to build it yourself nowadays. Just follow this guide. You can build ios / ios64 libraries and link them into your own application.

Faraz Khan

unread,
May 2, 2016, 8:06:07 PM5/2/16
to discuss-webrtc

Lisen Mu

unread,
May 26, 2016, 5:50:52 AM5/26/16
to discuss-webrtc
I do appreciate that the building process is extremely easy now. thanks.

However there are places in the world where it would take days and vpns to just download gigabytes from google code server.

I mean, it's not your fault, it's mine. But I will be most grateful if someone help me out on this.

faraz khan

unread,
May 26, 2016, 1:07:24 PM5/26/16
to discuss...@googlegroups.com
Ah that's a different problem :) I used to live in one of those places so I'm sympathetic. If you want a particular release I can put them up on Dropbox for you if you want.

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/Ra3qSvOOeyE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b775f858-0483-4915-9ffd-f8f1d0068efd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ilya Alberton

unread,
Oct 16, 2017, 2:56:36 AM10/16/17
to discuss-webrtc
Reviving the thread because lack of prebuilt versions seems to be panful when supporting legacy code.

We are trying to build WebRTC release_48 (needed for a legacy app). Even though the build process is easy - it's only easy for the latest version. However, for earlier versions, some dependencies needed by the gclient are broken and the entire process breaks. 

Where can we find prebuilt versions for iOS and Android? 

Any help will appreciated 

Sami Kalliomäki

unread,
Oct 16, 2017, 3:23:58 AM10/16/17
to discuss-webrtc
Unfortunately, I don't think we have prebuilt libraries for such old versions. We now have prebuilt libraries for more recent versions though.


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/338bdd42-aab5-4c55-bd06-9978c0ffba27%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages