Home

Awesome

MixedReality-WebRTC

Licensed under the MIT License Holodevelopers channel on Slack NuGet

MixedReality-WebRTC is a collection of libraries to help mixed reality app developers to integrate peer-to-peer real-time audio and video communication into their application and improve their collaborative experience.

MixedReality-WebRTC is part of the collection of repositories developed and maintained by the Mixed Reality Sharing team.

<h2><b><span style="color:red">Caution</span></b></h2>

<span style="color:red">MR-WebRTC has been deprecated. We're no longer committing development resources to it, taking pull requests for it, or planning a replacement for it.</span>

Download

NuGet (C++, C#) and UPM (Unity) packages are available for stable releases (release/* branches). See the Release page on GitHub or the Download documentation page for details.

Note: The master branch may contain breaking API changes from the latest stable release. It's therefore not guaranteed to work with NuGet packages, which are only available for stable releases. In particular, the Unity library scripts are only guaranteed to be compatible with NuGet packages if copied from a release/* branch, though it is strongly recommended to use the UPM packages instead.

Branches

The release/2.0 branch contains the latest stable version of the API, from which the NuGet and UPM packages are published.

The master branch contains the latest developments. Care has been taken to keep this branch in a fairly clean state (branch can build, tests pass). However the master branch contains API breaking changes compared to the latest release, and therefore is not compatible with NuGet/UPM packages and should be built from sources instead (see Building from sources documentation).

Documentation

The official documentation is hosted at https://microsoft.github.io/MixedReality-WebRTC/.

User Manual

The User Manual contains a general overview of the various libraries of the project and some tutorials on how to use them.

API reference

An API reference is available for the C# library and the Unity integration.

Overview

The overall architecture is as follow:

MixedReality-WebRTC architecture

LibraryLangDescription
mrwebrtcC/C++Native C/C++ library providing a low-level interface to the underlying WebRTC implementation from Google. Compared to the API exposed by the Google implementation (PeerConnection), the current interface is simplified to remove the burden of setup and configuring. It also tries to prevent common threading errors with the UWP wrappers. This library exposes are pure C API easily integrated into any C/C++ application.
Microsoft.MixedReality.WebRTCC# 7.3C# .Net Standard 2.0 library providing access to the same API as the native C library, exposed with familiar C# concepts such as async / await and Task.
Microsoft.MixedReality.WebRTC.UnityC# 7.3Unity3D integration - a set of Unity MonoBehaviour components with almost no required setup, to enable rapid prototyping and simplify integration into an existing app.
Microsoft.MixedReality.WebRTC.Unity.ExamplesC# 7.3Unity3D samples showcasing typical use scenarios like a peer-to-peer video chat app.

MixedReality-WebRTC is currently available for Windows 10 Desktop and UWP, with or without Unity, and Android (Unity only).

Note - In the following and elsewhere in this repository the term "Win32" is used as a synonym for "Windows Desktop", the historical Windows API for Desktop application development, and in opposition to the "Windows UWP" API. However Microsoft Windows versions older than Windows 10 with Windows SDK 17134 (April 2018 Update, 1803) are not officially supported for this project. In particular, older versions of Windows (Windows 7, Windows 8, etc.) are explicitly not supported.

Sources

This repository follows the Pitchfork Layout in an attempt to standardize its hierarchy:

bin/               # Binary outputs (generated)
build/             # Intermediate build artifacts (generated)
docs/              # Documentation sources
+ manual/          # User manual sources
examples/          # Examples of use and sample apps
external/          # Third-party external dependencies (git submodules)
libs/              # Source code for the individual libraries
tests/             # Source code for feature tests
tools/             # Utility scripts
+ build/           # Build scripts for the various platforms
  + android/       # Android Studio project to build libmrwebrtc.so
  + libwebrtc/     # Android build scripts for Google's WebRTC library
  + mrwebrtc/      # Windows build tools to build mrwebrtc.dll
+ ci/              # CI Azure pipelines

The Microsoft.MixedReality.WebRTC.sln Visual Studio 2019 solution located at the root of the repository contains several projects:

Note - Currently due to CI limitations some projects are downgraded to VS 2017, as the Google M71 milestone the master and release/1.0 branches are building upon does not support VS 2019, and Azure DevOps CI agents do not support multiple Visual Studio versions on the same agent. This will be reverted to VS 2019 eventually (see #14).

Building MixedReality-WebRTC

See the user manual section on Building from sources.

Special considerations for HoloLens 2

Known Issues

The current version is a public preview which contains known issues:

In addition, the Debug config of WebRTC core implementation is known to exhibit some performance issues on most devices, including some higher-end PCs. Using the Release config of the core WebRTC implementation usually prevents this, and is strongly recommended when not debugging.

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Reporting security issues and bugs

MixedReality-WebRTC builds upon the WebRTC implementation provided by Google. Security issues and bugs related to this implementation should be reported to Google.

Security issues and bugs related to MixedReality-WebRTC itself or to WebRTC UWP SDK should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.