示例
最后更新于:2022-04-02 03:30:16
[TOC]
> [sample](https://webrtc.github.io/samples/)
## 概述
访问媒体设备
* [基本的getUserMedia演示](https://webrtc.github.io/samples/src/content/getusermedia/gum/)
* [将getUserMedia与画布一起使用](https://webrtc.github.io/samples/src/content/getusermedia/canvas/)
* [将getUserMedia与canvas和CSS过滤器一起使用](https://webrtc.github.io/samples/src/content/getusermedia/filter/)
* [选择相机分辨率](https://webrtc.github.io/samples/src/content/getusermedia/resolution/)
* [仅音频的getUserMedia()输出到本地音频元素](https://webrtc.github.io/samples/src/content/getusermedia/audio/)
* [仅音频的getUserMedia()显示音量](https://webrtc.github.io/samples/src/content/getusermedia/volume/)
* [记录流](https://webrtc.github.io/samples/src/content/getusermedia/record/)
* [使用getDisplayMedia进行屏幕共享](https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/)
* [控制相机的平移,倾斜和缩放](https://webrtc.github.io/samples/src/content/getusermedia/pan-tilt-zoom/)
## 设备:
查询媒体设备
* [选择摄像头,麦克风和扬声器](https://webrtc.github.io/samples/src/content/devices/input-output/)
* [选择媒体源和音频输出](https://webrtc.github.io/samples/src/content/devices/multi/)
## 流捕获:
从画布或视频元素流
* [从视频元素流到视频元素](https://webrtc.github.io/samples/src/content/capture/video-video/)
* [从视频元素流向对等连接](https://webrtc.github.io/samples/src/content/capture/video-pc/)
* [从画布元素流到视频元素](https://webrtc.github.io/samples/src/content/capture/canvas-video/)
* [从画布元素流向对等连接](https://webrtc.github.io/samples/src/content/capture/canvas-pc/)
* [记录来自canvas元素的流](https://webrtc.github.io/samples/src/content/capture/canvas-record/)
* [通过内容提示指导视频编码](https://webrtc.github.io/samples/src/content/capture/video-contenthint/)
## [RTCPeerConnection:](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection)
控制对等连接
* [基本对等连接演示](https://webrtc.github.io/samples/src/content/peerconnection/pc1/)
* [纯音频对等连接演示](https://webrtc.github.io/samples/src/content/peerconnection/audio/)
* [随时更改带宽](https://webrtc.github.io/samples/src/content/peerconnection/bandwidth/)
* [通话前更改编解码器](https://webrtc.github.io/samples/src/content/peerconnection/change-codecs/)
* [升级通话并打开视频](https://webrtc.github.io/samples/src/content/peerconnection/upgrade/)
* [一次多个对等连接](https://webrtc.github.io/samples/src/content/peerconnection/multiple/)
* [将一台PC的输出转发到另一台PC](https://webrtc.github.io/samples/src/content/peerconnection/multiple-relay/)
* [Munge SDP参数](https://webrtc.github.io/samples/src/content/peerconnection/munge-sdp/)
* [建立对等连接时使用pranswer](https://webrtc.github.io/samples/src/content/peerconnection/pr-answer/)
* [约束和统计](https://webrtc.github.io/samples/src/content/peerconnection/constraints/)
* [更多限制和统计](https://webrtc.github.io/samples/src/content/peerconnection/old-new-stats/)
* [显示针对各种场景的createOffer输出](https://webrtc.github.io/samples/src/content/peerconnection/create-offer/)
* [使用RTCDTMFSender](https://webrtc.github.io/samples/src/content/peerconnection/dtmf/)
* [显示对等连接状态](https://webrtc.github.io/samples/src/content/peerconnection/states/)
* [从STUN / TURN服务器收集ICE候选人](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/)
* [重新启动ICE](https://webrtc.github.io/samples/src/content/peerconnection/restart-ice/)
* [Web音频输出作为对等连接的输入](https://webrtc.github.io/samples/src/content/peerconnection/webaudio-input/)
* [对等连接作为Web音频的输入](https://webrtc.github.io/samples/src/content/peerconnection/webaudio-output/)
* [使用可插入流进行端到端加密](https://webrtc.github.io/samples/src/content/peerconnection/endtoend-encryption)
(实验性)* [使用可插入流的视频分析仪](https://webrtc.github.io/samples/src/content/peerconnection/video-analyzer)
(实验性)
## [RTCDataChannel:](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel)
通过对等连接发送任意数据
* [传送文字](https://webrtc.github.io/samples/src/content/datachannel/basic/)
* [传送档案](https://webrtc.github.io/samples/src/content/datachannel/filetransfer/)
* [传输资料](https://webrtc.github.io/samples/src/content/datachannel/datatransfer/)
* [讯息传递](https://webrtc.github.io/samples/src/content/datachannel/messaging/)
';