1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
using Org.WebRtc; var iceServers = new IceServer[] { new IceServer { Url = "stun:stun.l.google.com:19302" } }; var config = new RTCConfiguration() { BundlePolicy = RTCBundlePolicy.Balanced, IceTransportPolicy = RTCIceTransportPolicy.All, IceServers = iceServers }; var peerConnection = new RTCPeerConnection(config); peerConnection.OnIceCandidate = (iceEvent) => { SendMessage(iceEvent.Candidate); }; Media media = Media.CreateMedia(); MediaStream mediaStream = await media.GetUserMedia(new RTCMediaStreamConstraints { AudioEnabled = true, VideoEnabled = true }); peerConnection.AddStream(mediaStream); |
Q: How does the WebRTC UWP project relate to the functionality in Edge? What codecs are supported?
A: Edge supports ORTC, and as of this writing it supports WebRTC 1.0 for Insider Preview releases. The distinction to make is that Edge supports WebRTC and ORTC on Desktop only, where UWP libraries run on all Windows 10 platforms. In addition, the WebRTC UWP library (and ORTC Lib) support DataChannel & SCTP on all platforms today, while DataChannel is currently under consideration for Edge. The UWP libraries support H.264 (hardware accelerated), VP8, VP9, Opus, G.711 and G.722 codecs as well as comfort noise and DTMF.
Q: Wow- this has a lot of differences from the Edge implementation. Is it derived from the same source?
A: No. At the time of this project’s inception over 2 years ago, WebRTC was not available in Edge (even in Insider Preview releases) so it was developed independently. It was also developed with the intent of open sourcing the project, which is not a goal for Edge.
Support | Edge | UWP |
---|---|---|
Environments | Desktop browser | Native apps: mobile, desktop, IoT, Xbox, HoloLens |
peerConnection | Most | Yes (WebRTC for UWP, ORTC Lib via shim) |
ORTC | Yes | Yes* |
DataChannel | No | Yes |
Video Codecs | H.264/AVC | H.264/AVC |
H.264/UC | ||
VP8 | VP8 with simulcast and temporal scalability | |
VP9 with temporal scalability | ||
Audio codecs | Opus (no internal FEC) | Opus with internal FEC |
G.711 | G.711 | |
G.722 | G.722 | |
SILK | ||
DTMF | DTMF | |
CN | CN | |
Resilience | RTX | RTX |
RED | RED | |
ulpfec | ||
ulpfecuc |
*Not provided by Microsoft but supported in the ortclib.org community project.
Q: Interesting, so then how does this implementation compare to the official Chromium WebRTC repo managed by Google ?
A: Google’s WebRTC source supports iOS, Android, Win32 (Desktop) for native development. We actually started the WebRTC UWP project by modifying Google’s Win32 codebase and adapting it for UWP. Along the way we removed the dependency on DirectX for rendering and moved to the Microsoft Media Foundation to improve performance and power consumption, and modified the audio pipeline to use WASAPI.
Q: Is the project open source?
A: This project is open source and available on GitHub here. It is also available on NuGet. We’ve tried to keep the license as free and open as Google’s project.
Q: What samples are available?
A: There are several samples available, some of which are UWP ports of Google samples. UWP versions demonstrating PeerConnection, AppRTC and DataChannel are available here. Additionally, we shipped a full-featured Windows 10 VoIP sample called Chatterbox which is quite extensive. See the readme here for more details.
Q: Who is the target audience for this? Is it make for specific applications/use cases?
A: This library is intended for developers building native applications targeting the Universal Windows Platform on Windows 10 devices. This includes developers who work in C++, C#, F#, JavaScript, TypeScript, Python, or any other language accessible from WinRT.
Q: Can a developer use UWP WebRTC for free (or do they need to spend hundreds on a commercial VS license)?
A: Yes. The WebRTC UWP library is freely available on NuGet and as an Open Source GitHub project. Free tooling for developers is available as well, including Visual Studio Code and Visual Studio Community.
Q: What are the advantages of building a desktop UWP app with WebRTC or ORTC Lib vs. using Electron (with Chromium)?
A: UWP apps run on all Windows 10 devices including Xbox and HoloLens, while Win32 apps such as those built with Electron run only on the Desktop.
Q: How does this release compare to other WebRTC and ORTC packages on NuGet?
A: This release is the only UWP port of WebRTC available on NuGet here. Microsoft actively supports this project works to keep it current with the latest Chrome source. As of this writing, the latest NuGet package is based on the M54 source. Microsoft also engages with the Open Peer Foundation on the ORTC UWP NuGet package to lend our UWP expertise, but to be clear we do not own or provide support for that codebase.
Q: Are there any apps you can name that are using this?
A: Blackboard was an early supporter of this project and actively worked on the codebase with Microsoft. Their Windows Mobile app uses this project. In addition, Caw.Me ships their Slack calling plugin for Windows using this project as well.
Q: Is this project actively supported? Will someone respond to issues and pull requests?
A: Yes, the project is under active development. We periodically merge in the latest Chromium source to maintain browser compatibility – as of this writing the project is based on M54. We also respond to issues and PRs on GitHub and welcome anyone to join our Slack channel to communicate directly with the development team.
Q: Will there be on-going updates? If yes, do you have a roadmap or direction you can share?
A: Yes, development is ongoing. In the coming months we will perform an additional pull from the Chromium source (version TBD).
Q: What UWP platforms has this been tested on other than Win 10 Desktop? IoT core? Xbox? HoloLens?
A: The project has been tested on Windows 10 Desktop, Mobile, Xbox, HoloLens and IoT (for DataChannel) and we support all platforms.
Q: Outside of the core Visual Studio tools, what tools, libraries, and add-ons work with the new WebRTC UWP stack?
A: The WebRTC UWP library as well as ORTC Lib are standard NuGet packages and they work anywhere you can reference them, including the lightweight editor Visual Studio Code. Developers can use them in conjunction with any other frameworks they’re used to, such as Xamarin, React Native and Electron.
Q: Are there any Xbox, HoloLens, or IoT projects you can talk about that use this?
A: On Xbox, there are projects that stream media using the WebRTC UWP library as well as games that use the ORTC Lib audio and DataChannel for multiplayer scenarios. For HoloLens, remote assistance is a core scenario that many partners have built which enables a remote party to view the HoloLens user’s environment and provide feedback via video and audio. On IoT there has been a lot of interest in using DataChannel to stream data from sensors connected to a Raspberry Pi to a remote peer.
Q: Where is the best place for our readers to go to get more information and to stay up-to-date on this project?
A: For the most up to date information keep an eye on GitHub and NuGet packages referenced above. Look for upcoming posts on the Developing Apps for Windows blog here. You can also follow me on Twitter for updates @jamescadd.
{
“Q&A”:{
“interviewer”: “chad hart“,
“interviewee”: “james cadd“
}
}
Leave a Reply