WebRTC

维基百科,自由的百科全书
跳转到导航 跳转到搜索
WebRTC
File:WebRTC Logo.svg
原作者Justin Uberti
Peter Thatcher
首次发布2011年,​15年前​(2011
当前版本
    Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
    源代码库
    • {{URL|example.com|可选的显示文本}}
    Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
    编程语言C++[1], Javascript
    引擎
      Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
      许可协议BSD license

      WebRTC,名称源自网页即时通信(英语:Web Real-Time Communication)的缩写,是一个支持网页浏览器进行实时语音对话或视频对话的API。它于2011年6月1日开源并在GoogleMozillaOpera支持下被纳入万维网联盟W3C推荐标准[2][3][4]

      浏览器支持[编辑]

      当前支持情况[编辑]

      WebRTC在以下浏览器版本中开始支持。

      支持历史细节[编辑]

      • Google Chrome:2012年1月,将WebRTC集成进Dev Channel,同年6月又完成Stable Channel的20版的集成(2012年7月,PeerConnection与MediaStream仍必须透过chrome://flags来开启)[10]
      • Mozilla Firefox:2012年初Mozilla集成WebRTC入Firefox Alpha,此一版本的Audio Mixing已完成于Media Stream[11]
        • 2012年4月,Mozilla展示Firefox中WebRTC的视频对话[12]
        • 2013年6月,发布22.0版本正式集成及支持WebRTC[13]
        • 2013年9月,发布24.0版本,并宣布Firefox for Android(移动版)正式集成及支持WebRTC[14]
      • Opera:2012年1月,Opera初步集成WebRTC。
      • Internet Explorer:Microsoft开始开放API[15]
      • Ericsson:2012年11月,Ericsson Labs做出了全世界第一个可以支持WebRTC的手机浏览器[16]
      • SeaMonkey:2013年1月发布的15.0版本初步集成WebRTC。

      历史[编辑]

      2010年5月,Google以6820万美元收购VoIP软件开发商Global IP Solutions的GIPS引擎[2][17][18],并改为名为“WebRTC”。WebRTC使用GIPS引擎,实现了基于网页的视频会议,并支持722,PCM,ILBC,ISAC等编码,同时使用谷歌自家的VP8影片解码器;同时支持RTP/SRTP传输等。

      2012年1月,谷歌已经把这款软件集成到Chrome浏览器中。同时FreeSWITCH项目宣称支持iSAC audio codec[19]

      组成[编辑]

      • 影像引擎(VideoEngine)
      • 音效引擎(VoiceEngine)
      • 会议管理(Session Management)
      • iSAC:音效压缩
      • VP8:Google自家的WebM项目的影片编解码器
      • APIs(Native C++ API, Web API)

      重要API[编辑]

      WebRTC原生APIs文件是基于WebRTC规格书[20]撰写而成,这些API可分成Network Stream API、 RTCPeerConnection、Peer-to-peer Data API三类。

      Network Stream API[编辑]

      • MediaStream:MediaStream用来表示一个媒体数据流。
      • MediaStreamTrack在浏览器中表示一个媒体源。

      RTCPeerConnection[编辑]

      • RTCPeerConnection:一个RTCPeerConnection对象允许用户在两个浏览器之间直接通讯。
      • RTCIceCandidate:表示一个ICE协议的候选者。
      • RTCIceServer:表示一个ICE Server。

      Peer-to-peer Data API[编辑]

      • DataChannel:数据通道(DataChannel)接口表示一个在两个节点之间的双向的数据通道。

      安全性[编辑]

      漏洞

      2015年,TorrentFreak报告了一个WebRTC的安全漏洞,该漏洞会致使安装有WebRTC的用户泄露真实IP,即使用户已经使用虚拟私人网路。[21]

      解决方案
      Mozilla Firefox:在地址栏输入“about:config”,搜索“media.peerconnection.enabled”并双击将值改为“false”,WebRTC将被关闭。[22]

      Google Chrome:在谷歌应用商店安装谷歌官方扩展“WebRTC Network Limiter”。[23]

      其它方案

      uBlock Origin:安装uBlock Origin并在设置中启用“避免WebRTC 泄露本地IP地址”可以避免本地IP泄露。但需注意的是,该方案不适用于Firefox 41(或更低)、uBlock Origin 1.3.3(或更低)版本用户,且该设置选项在本程序的1.38版本中被移除[24]

      隐私獾:安装隐私獾并在设置中启用“避免 WebRTC 泄露本地 IP 地址 ”可以获得额外防护,但该选项在其2022年9月27日更新的新版本中移除。[25]

      相关条目[编辑]

      参考资料[编辑]

      1. ^ src/webrtc - Git at Google. [2018-09-09]. (原始内容存档于2018-04-23). 
      2. ^ 2.0 2.1 Google open source WebRTC for open video/audio chat. 2011-06-01 [2012-03-16]. (原始内容存档于2011-06-25). 
      3. ^ WebRTC. [2012-03-16]. (原始内容存档于2011-06-04). 
      4. ^ Introducing WebRTC - an open real-time communications project. 2011-05-03 [2012-03-16]. (原始内容存档于2011-06-28). 
      5. ^ Firefox Notes - Desktop页面存档备份,存于互联网档案馆). Mozilla.org (2013-06-25). Retrieved on 2014-04-11.
      6. ^ Dev.Opera. My.opera.com. Retrieved on 2014-04-11.
      7. ^ Apple Releases Safari Technology Preview 11 With Bug Fixes and Feature Tweaks. [2017-06-10]. (原始内容存档于2021-08-20) (English). 
      8. ^ Firefox Notes - Desktop页面存档备份,存于互联网档案馆). Mozilla.org (2013-09-17). Retrieved on 2014-08-04.
      9. ^ Browser - WebRTC on iOS. [2015-01-01]. (原始内容存档于2020-08-08). 
      10. ^ Real-time Communications in Chrome. 2012-01-18 [2012-08-19]. (原始内容存档于2022-04-12). 
      11. ^ Paul, Ryan. Mozilla Demos MediaStream Processing, Audio Mixing in Firefox. 2012-01-10 [2012-08-19]. (原始内容存档于2012-08-17). 
      12. ^ Mozilla shows WebRTC browser-based video calling. 2012-04-10 [2012-08-19]. (原始内容存档于2021-07-14). 
      13. ^ Mozilla Firefox 22.0 Release Notes. Mozilla.org. 2013-06-25 [2013-06-26]. (原始内容存档于2013-10-28). 
      14. ^ 行動版 Firefox 24 已支援 WebRTC. Mozilla Taiwan. 2013-09-24 [2013-10-02]. (原始内容存档于2013-10-05). 
      15. ^ HTML5Labs - Info. [2012-08-19]. (原始内容存档于2016-03-07). 
      16. ^ The World’s First WebRTC-Enabled Mobile Browser. 2012-10-19 [2012-11-29]. (原始内容存档于2012-12-18). 
      17. ^ License & Rights. [2012-03-16]. (原始内容存档于2011-06-04). 
      18. ^ FAQ - WebRTC. [2012-03-16]. (原始内容存档于2011-06-04). 
      19. ^ WebRTC Gets a Shot in the Arm with mod_iSAC!. 2012-01-24 [2012-03-16]. (原始内容存档于2012-02-04). 
      20. ^ WebRTC 1.0: Real-time Communication Between Browsers 协议文档中文版 汇总. [2012-10-17]. (原始内容存档于2012-10-19). 
      21. ^ Ernesto. Huge Security Flaw Leaks VPN Users’ Real IP-Addresses. torrentfreak. 2015年1月30日 [2018年3月1日]. (原始内容存档于2015年2月22日). 
      22. ^ Sphinx FreeBuf. WebRTC漏洞可泄露VPN用户真实IP. 比特网. 2015-02-06 [2018-03-01]. (原始内容存档于2018-08-16). 
      23. ^ WebRTC Network Limiter - Chrome Web Store. Chrome网上应用店. 
      24. ^ Prevent WebRTC from leaking local IP address. github. [2018-03-01]. (原始内容存档于2016-02-21). 
      25. ^ EFForg. Changelog. Github. 2022-09-27 [2023-07-21]. (原始内容存档于2023-07-21) (English). 

      外部链接[编辑]