This is a repository for the WebRTC Javascript code samples.
Some of the samples use new browser features. They may only work in Chrome Canary and/or Firefox Beta, and may require flags to be set.
All of the samples use adapter.js, a shim to insulate apps from spec changes and prefix differences. In fact, the standards and protocols used for WebRTC implementations are highly stable, and there are only a few prefixed names. For full interop information, see webrtc.org/web-apis/interop.
In Chrome and Opera, all samples that use getUserMedia()
must be run from a server. Calling getUserMedia()
from a file:// URL will work in Firefox, but fail silently in Chrome and Opera.
webrtc.org/testing lists command line flags useful for development and testing with Chrome.
For more information about WebRTC, we maintain a list of WebRTC Resources. If you've never worked with WebRTC, we recommend you start with the 2013 Google I/O WebRTC presentation.
Patches and issues welcome! See CONTRIBUTING for instructions. All contributors must sign a contributor license agreement before code can be accepted. Please complete the agreement for an individual or a corporation as appropriate. The Developer's Guide for this repo has more information about code style, structure and validation. Head over to test/README.md and get started developing.
getUserMedia + canvas + CSS Filters
getUserMedia with resolution constraints
getUserMedia with camera, mic and speaker selection
Audio-only getUserMedia output to local audio element
Audio-only getUserMedia displaying volume
Stream from a canvas element to a video element
Stream from a canvas element to a peer connection
Select camera, microphone and speaker
Select media source and audio output
Multiple peer connections at once
Forward output of one peer connection into another
Use pranswer when setting up a peer connection
Adjust constraints, view stats
Display peer connection states
ICE candidate gathering from STUN/TURN servers
Web Audio output as input to peer connection
Peer connection as input to Web Audio
AppRTC video chat client powered by Google App Engine
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。