WebRTC explained

WebRTC
Latest Release Version:1.0[1]
Programming Language:C++,[2] JavaScript
Author:Justin Uberti
Peter Thatcher

WebRTC (Web Real-Time Communication) is a free and open-source project providing web browsers and mobile applications with real-time communication (RTC) via application programming interfaces (APIs). It allows audio and video communication and streaming to work inside web pages by allowing direct peer-to-peer communication, eliminating the need to install plugins or download native apps.

Supported by Apple, Google, Microsoft, Mozilla, and Opera, WebRTC specifications have been published by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF).[3] [4]

According to the webrtc.org website, the purpose of the project is to "enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols".[5]

History

In May 2010, Google bought Global IP Solutions or GIPS, a VoIP and videoconferencing software company that had developed many components required for RTC, such as codecs and echo cancellation techniques. Google open-sourced the GIPS technology and engaged with relevant standards bodies at the IETF and W3C to ensure industry consensus.[6] [7] In May 2011, Google released an open-source project for browser-based real-time communication known as WebRTC. This has been followed by ongoing work to standardize the relevant protocols in the IETF and browser APIs in the W3C.

In January 2011, Ericsson Labs built the first implementation of WebRTC using a modified WebKit library.[8] In October 2011, the W3C published its first draft for the spec.[9] WebRTC milestones include the first cross-browser video call (February 2013), first cross-browser data transfers (February 2014), and as of July 2014 Google Hangouts was "kind of" using WebRTC.[10]

The W3C draft API was based on preliminary work done in the WHATWG. It was referred to as the ConnectionPeer API, and a pre-standards concept implementation was created at Ericsson Labs. The WebRTC Working Group expects this specification to evolve significantly based on:

In November 2017, the WebRTC 1.0 specification transitioned from Working Draft to Candidate Recommendation.[12]

In January 2021, the WebRTC 1.0 specification transitioned from Candidate Recommendation to Recommendation.[3]

Design

Major components of WebRTC include several JavaScript APIs:

The WebRTC API also includes a statistics function:

The WebRTC API includes no provisions for signaling, that is discovering peers to connect to and determine how to establish connections among them. Applications use Interactive Connectivity Establishment for connections and are responsible for managing sessions, possibly relying on any of Session Initiation Protocol, Extensible Messaging and Presence Protocol (XMPP), Message Queuing Telemetry Transport, Matrix, or another protocol. Signaling may depend on one or more servers.[14] [15]

requires implementations to provide PCMA/PCMU, Telephone Event as DTMF, and Opus audio codecs as minimum capabilities. The PeerConnection, data channel and media capture browser APIs are detailed in the W3C specification.

W3C is developing ORTC (Object Real-Time Communications) for WebRTC.

Applications

WebRTC allows browsers to stream files directly to one another, reducing or entirely removing the need for server-side file hosting. WebTorrent uses a WebRTC transport to enable peer-to-peer file sharing using the BitTorrent protocol in the browser.[16] Some file-sharing websites use it to allow users to send files directly to one another in their browsers, although this requires the uploader to keep the tab open until the file has been downloaded.[17] [18] [19] A few CDNs, such as the Microsoft-owned Peer5, use the client's bandwidth to upload media to other connected peers, enabling each peer to act as an edge server.[20] [21]

Although initially developed for web browsers, WebRTC has applications for non-browser devices, including mobile platforms and IoT devices. Examples include browser-based VoIP telephony, also called cloud phones or web phones, which allow calls to be made and received from within a web browser, replacing the requirement to download and install a softphone.[22]

Support

WebRTC is supported by the following browsers (incomplete list; oldest supported version specified):

GStreamer directly provides a free WebRTC implementation.[23]

Codec support across browsers

WebRTC establishes a standard set of codecs which all compliant browsers are required to implement. Some browsers may also support other codecs.[24]

Video codec compatibility!Codec name!Profile(s)!Browser compatibility
H.264Constrained Baseline (CB)Chrome (52+), Firefox[1], Safari
VP8-Chrome, Firefox, Safari (12.1+)[25]
VP9-Chrome (48+), Firefox
Audio codec compatibility!Codec name!Browser compatibility
OpusChrome, Firefox, Safari
G.711 PCM (A-law)Chrome, Firefox, Safari
G.711 PCM (μ-law)Chrome, Firefox, Safari
G.722Chrome, Firefox, Safari
iLBCChrome, Safari
iSACChrome, Safari

Vulnerability

In January 2017, TorrentFreak reported a serious security flaw in browsers supporting WebRTC, that compromised the security of VPN tunnels by exposing a user's true IP address. The IP address read requests are not visible in the browser's developer console, and they are not blocked by most ad blocking, privacy and security add-ons, enabling online tracking despite precautions.

It has been reported that the cause of the address leak is not a bug that can be patched, but is foundational to the way WebRTC operates; however, there are several solutions to mitigate the problem. WebRTC leakage can be tested for, and solutions are offered for most browsers.[26] WebRTC can be disabled, if not required, in most browsers. The uBlock Origin add-on can fix this problem (as some browsers now fix this problem by themselves, from uBlock Origin v1.38 onwards this option has been disabled on these browsers[27]).

See also

Further reading

External links

Notes and References

  1. Web site: WebRTC 1.0: Real-time Communication Between Browsers. World Wide Web Consortium. 25 March 2019. 27 September 2018. 7 April 2019. https://web.archive.org/web/20190407011412/http://www.w3.org/TR/webrtc/. live.
  2. Web site: Src/webrtc - Git at Google . 2018-04-22 . 2018-04-23 . https://web.archive.org/web/20180423034244/https://webrtc.googlesource.com/src/webrtc/ . live .
  3. Web site: 26 Jan 2021. Web Real-Time Communications (WebRTC) transforms the communications landscape as it becomes a World Wide Web Consortium (W3C) Recommendation and Internet Engineering Task Force (IETF) standards. live. https://web.archive.org/web/20220727142803/https://www.w3.org/2021/01/pressrelease-webrtc-rec.html.en. 27 July 2022. 27 Jan 2021. World Wide Web Consortium.
  4. Web site: Rtcweb Status Pages. 2021-02-18. tools.ietf.org. 2020-04-20. https://web.archive.org/web/20200420003228/https://tools.ietf.org/wg/rtcweb/. live.
  5. Web site: WebRTC. WebRTC. 6 February 2018. https://web.archive.org/web/20180128042919/https://webrtc.org/. 28 January 2018. bot: unknown.
  6. Web site: Are the WebRTC components from Google's acquisition of Global IP Solutions?. WebRTC. 6 February 2018. 7 June 2011. https://web.archive.org/web/20110607005550/https://webrtc.org/faq/#are-the-webrtc-components-from-googles-acquisition-of-global-ip-solutions. dead.
  7. News: Wauters. Robin. Google makes $68.2 million cash offer for Global IP Solutions. 6 February 2018. TechCrunch. 18 May 2010. 7 February 2018. https://web.archive.org/web/20180207062936/https://techcrunch.com/2010/05/18/google-makes-68-2-million-cash-offer-for-global-ip-solutions/. live.
  8. News: Stefan Håkansson. Stefan Ålund. Beyond HTML5: Experiment with Real-Time Communication in a Browser. 6 February 2018. Ericsson Research blog. 26 May 2011. 7 February 2018. https://web.archive.org/web/20180207012115/https://www.ericsson.com/research-blog/beyond-html5-experiment-real-time-communication-browser/. live.
  9. Web site: WebRTC 1.0: Real-time Communication Between Browsers (W3C Working Draft 27 October 2011). World Wide Web Consortium. 6 February 2018. 27 October 2011. 29 October 2011. https://web.archive.org/web/20111029173130/https://www.w3.org/TR/2011/WD-webrtc-20111027/. live.
  10. Web site: Nowak. Szymon. WebRTC: So Much More Than Videoconferencing. GitHub. 6 February 2018. 7 February 2018. https://web.archive.org/web/20180207005022/https://szimek.github.io/presentation-meetjs-summit-2014-webrtc/#16. live.
  11. Web site: SIP Trunking VoIP with WebRTC SDK . SIP Trunking . MTPL . Moon Technolabs . 18 July 2023 . 18 July 2023 . 5 August 2023 . https://web.archive.org/web/20230805170916/https://www.moontechnolabs.com/blog/sip-trunking/ . live .
  12. Web site: WebRTC 1.0: Real-time Communication Between Browsers (W3C Candidate Recommendation 02 November 2017) . 2 November 2017 . 25 March 2019 . 2 November 2017 . https://web.archive.org/web/20171102204947/https://www.w3.org/TR/2017/CR-webrtc-20171102/ . live .
  13. Web site: RFC 8831 - WebRTC Data Channels . 2022-03-10 . datatracker.ietf.org . en . 2022-03-10 . https://web.archive.org/web/20220310133453/https://datatracker.ietf.org/doc/html/rfc8831 . live .
  14. Web site: WebRTC Server: What is it exactly? . 13 April 2020 . Tsahi Levent-Levi . BlogGeek.me . 10 June 2020 . 11 May 2020 . https://web.archive.org/web/20200511114630/https://bloggeek.me/webrtc-server/ . live .
  15. Web site: Matrix.org and WebRTC: An Interview with Matthew Hodgson . 13 November 2014 . Tsahi Levent-Levi . BlogGeek.me . 10 June 2020 . 25 February 2021 . https://web.archive.org/web/20210225150612/https://bloggeek.me/matrix-webrtc-interview/ . live .
  16. Web site: WebTorrent FAQ . 2022-03-10 . webtorrent.io . en . 2022-03-11 . https://web.archive.org/web/20220311144830/https://webtorrent.io/faq . live .
  17. Web site: 2021-08-04 . How to Transfer Files Between Linux, Android, and iOS Using Snapdrop . 2022-03-10 . MUO . en-US . 2022-01-29 . https://web.archive.org/web/20220129164205/https://www.makeuseof.com/transfer-files-between-linux-android-ios-snapdrop/ . live .
  18. Web site: Pinola . Melanie . 2014-04-07 . The easiest and quickest way to transfer files between devices on the same network . 2022-03-10 . Computerworld . en . 2022-06-28 . https://web.archive.org/web/20220628235829/https://www.computerworld.com/article/2697955/the-easiest-and-quickest-way-to-transfer-files-between-devices-on-the-same-network.html . live .
  19. Web site: 2015-05-12 . FilePizza: share files without the middleman in your browser - gHacks Tech News . 2022-03-10 . gHacks Technology News . en-US . 2022-01-23 . https://web.archive.org/web/20220123091008/https://www.ghacks.net/2015/05/12/filepizza-share-files-without-the-middleman-in-your-browser/ . live .
  20. Web site: Foley . Mary Jo . Microsoft acquires Peer5 to supplement Teams' live video streaming . 2022-03-10 . ZDNet . en . 2022-03-10 . https://web.archive.org/web/20220310140207/https://www.zdnet.com/article/microsoft-acquires-peer5-to-supplement-teams-live-video-streaming/ . live .
  21. Web site: Overview - Peer5 P2P Docs . 2022-03-10 . docs.peer5.com . 2022-03-16 . https://web.archive.org/web/20220316194439/https://docs.peer5.com/overview/ . live .
  22. Web site: Catch the Babelfish: Irish telco devises a new kind of cloud phone. November 2017. 2017-11-20. 2017-11-01. https://web.archive.org/web/20171101172651/https://www.siliconrepublic.com/comms/babelfish-softphone-cloud-goldfish. live.
  23. Web site: GStreamer 1.14 release notes. gstreamer.freedesktop.org. 2019-12-19. 2018-03-20. https://web.archive.org/web/20180320084417/https://gstreamer.freedesktop.org/releases/1.14/. live. since version 1.15
  24. Web site: Codecs used by WebRTC - Web media technologies MDN. 2021-07-29. developer.mozilla.org. en-US. 2021-07-27. https://web.archive.org/web/20210727121111/https://developer.mozilla.org/en-US/docs/Web/Media/Formats/WebRTC_codecs. live.
  25. Web site: Fablet. Youenn. 2019-03-12. On the Road to WebRTC 1.0, Including VP8. 2021-07-29. WebKit. 2021-07-29. https://web.archive.org/web/20210729000922/https://webkit.org/blog/8672/on-the-road-to-webrtc-1-0-including-vp8/. live.
  26. Web site: WebRTC leaks real IP addresses (even with VPN) . Timmerman . Crystal . IPVanish . 28 February 2022 . 12 August 2022 . 13 August 2022 . https://web.archive.org/web/20220813032544/https://www.ipvanish.com/blog/webrtc/ . live .
  27. Web site: Prevent WebRTC from leaking local IP address . Raymond Hill . uBlock Origin documentation. . 17 Sep 2021 . 18 Dec 2021 . 21 February 2016 . https://web.archive.org/web/20160221222622/https://github.com/gorhill/uBlock/wiki/Prevent-WebRTC-from-leaking-local-IP-address . live .