We are currently focusing our efforts on getting out of the fork business. This effort is happening in the WinRTC GitHub repo. Keeping WebRTC-UWP fork doesn't allow us to move fast enough. We are contributing back the changes needed to build WebRTC.org code base for UWP. Here are some of the changes we're contributing back:
- https://webrtc-review.googlesource.com/c/src/+/167021
- https://boringssl-review.googlesource.com/c/boringssl/+/39584
- https://chromium-review.googlesource.com/c/chromium/src/+/1962509
- abseil/abseil-cpp#594
- abseil/abseil-cpp#596
Besides the new video capturing module that is being reviewed, we're also creating a new audio capturing module. There are more changes in the pipeline to be contributed back and more changes required for finishing the port. After having WebRTC.org code base compatible with UWP, we're going to work on a WinRT abstraction layer allowing easy consumption of WebRTC capabilities by WinRT projections.
That said, keep in mind we are contributing back the changes and we have no control over when/if the changes will be accepted by their teams.
This repository and the linked subrepos contains all the source and sample applications for the WebRTC UWP SDK. For additional documentation see webrtc-uwp.github.io.
From your terminal, recursively clone this repo to obtain all the source code & dependencies needed to build WebRTC for UWP:
git clone --recursive https://github.com/webrtc-uwp/webrtc-uwp-sdk
Directory | Description |
---|---|
webrtc-uwp-sdk\scripts |
scripts for preparing an environment for Windows |
webrtc-uwp-sdk\common |
samples applications (AppRTC and PeerCC) |
webrtc-uwp-sdk\webrtc |
WebRTC code - builds as Org.WebRtc.dll |
webrtc-uwp-sdk\docs |
documentation |
- Visual Studio 2017 (latest tested version tested 15.9.7); Community Edition is supported
- Windows SDK 17134 (available from archive page)
- This SDK version is hard coded in the Google source and required to build the WebRTC library.
- When installing the SDK, include the feature Debugging Tools for Windows which is required by the preparation scripts. Note that the SDK installed as part of Visual Studio does not include this feature.
- Windows SDK 17763 (available from archive page)
- This SDK version is used by the WebRTC UWP wrappers and required to build the managed code.
- When installing the SDK, include the feature Debugging Tools for Windows which is required by the preparation scripts. Note that the SDK installed as part of Visual Studio does not include this feature.
- C++/WinRT Visual Studio extension (available from the VS Marketplace)
- The minimum required Windows version to deploy apps is 1703 / Build 10.0.15063 / Anniversary Update
- Strawberry Perl (Supported perl version can be obrained from http://strawberryperl.com/)
- Due to the Windows limit on path length it is recommended to clone close to the root.
C:\repos\my-branch
is known to work, longer paths may fail. - Older issues of Python 2.7.x can fail for unknown reasons. To resolve:
- Uninstall Python 2.7
- Install Python 2.7.15
- Ensure
C:\Python27
is at the top of the system path - From an Administrator command prompt at
C:\Python27\scripts
run the following:python -m pip install --upgrade pip
pip install pywin32
- Create a clean clone & attempt to build the repo.
Several build options, including NuGet package creation, are available through command line scripts or Visual Studio. For more information see the webrtc-scripts repo. The simplest method to build the SDK and PeerCC sample in Visual Studio is described below.
- Open the solution
webrtc-uwp-sdk\webrtc\windows\solutions\WebRtc.Universal.sln
in Visual Studio - To build whole solution or to build PeerConnectionClient.WebRtc, before native and wrapper libs are built it is necessary to change VS2017 settings (Tools->Options->Project and Solutions->Allow parallel projects initialization uncheck it).
- Note this is no longer necessary as of VS 15.9.7
- Right click the
PeerConnectionClient.WebRtc
project and choose Set as Startup Project - Choose processor architecture
- Hit F5
- Unity version 2019.1.0f2 or later. Add the following components: Universal Windows Platform Build Support and Windows Build Support (IL2CPP).
- Open
webrtc\windows\solutions\WebRtcUnity.sln
solution, select x86 platform and build PeerConnectionClientUnityCore project. The build procedure produces WebRTC libraries, WebRTC for UWP wrapper component and deploys WebRTC and Peer Connection Client Core libraries to the Unity project space. - Open Unity project `common\windows\samples\PeerCC\ClientUnity' in Unity Editor
- Go to 'File' -> 'Build settings...', select 'Universal Windows Platform', click on the 'Build' button and choose an export folder
- Add the following XML block to generated manifest file
PeerCCUnity\Package.appxmanifest
:
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>WebRtcScheme.dll</Path>
<ActivatableClass ActivatableClassId="WebRtcScheme.SchemeHandler" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
- Open PeerCCUnity.sln from export folder, build PeerCCUnity project and run the application on the device