Skip to content

Recursively clone this repo to obtain all the source code needed to build WebRTC for UWP

Notifications You must be signed in to change notification settings

webrtc-uwp/webrtc-uwp-sdk

Repository files navigation

WebRTC UWP SDK

This project has been deprecated

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:

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.

Overview

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.

Cloning

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 Structure

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

Prerequisites

  • 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/)

Known Issues

  • 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:
    1. Uninstall Python 2.7
    2. Install Python 2.7.15
    3. Ensure C:\Python27 is at the top of the system path
    4. From an Administrator command prompt at C:\Python27\scripts run the following:
      1. python -m pip install --upgrade pip
      2. pip install pywin32
    5. Create a clean clone & attempt to build the repo.

Building the SDK

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.

  1. Open the solution webrtc-uwp-sdk\webrtc\windows\solutions\WebRtc.Universal.sln in Visual Studio
  2. 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
  3. Right click the PeerConnectionClient.WebRtc project and choose Set as Startup Project
  4. Choose processor architecture
  5. Hit F5

Unity Video Rendering on HoloLens

Unity build requirements

  • Unity version 2019.1.0f2 or later. Add the following components: Universal Windows Platform Build Support and Windows Build Support (IL2CPP).

Running Unity Peer Connection Client application on HoloLens device (or HoloLens simulator)

  1. 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.
  2. Open Unity project `common\windows\samples\PeerCC\ClientUnity' in Unity Editor
  3. Go to 'File' -> 'Build settings...', select 'Universal Windows Platform', click on the 'Build' button and choose an export folder
  4. 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>
  1. Open PeerCCUnity.sln from export folder, build PeerCCUnity project and run the application on the device

About

Recursively clone this repo to obtain all the source code needed to build WebRTC for UWP

Resources

Stars

Watchers

Forks

Packages

No packages published