CARVIEW |
WebRTC samples
This is a collection of small samples demonstrating various parts of the WebRTC APIs. The code for all samples are available in the GitHub repository.
Most of the samples use adapter.js, a shim to insulate apps from spec changes and prefix differences.
https://webrtc.org/getting-started/testing lists command line flags useful for development and testing with Chrome.
Patches and issues welcome! See CONTRIBUTING.md for instructions.
Warning: It is highly recommended to use headphones when testing these samples, as it will otherwise risk loud audio feedback on your system.
getUserMedia():
Access media devices
- Basic getUserMedia demo
- Use getUserMedia with canvas
- Use getUserMedia with canvas and CSS filters
- Choose camera resolution
- Audio-only getUserMedia() output to local audio element
- Audio-only getUserMedia() displaying volume
- Record stream
- Screensharing with getDisplayMedia
- Control camera pan, tilt, and zoom
- Control exposure
Devices:
Query media devices
Stream capture:
Stream from canvas or video elements
- Stream from a video element to a video element
- Stream from a video element to a peer connection
- Stream from a canvas element to a video element
- Stream from a canvas element to a peer connection
- Record a stream from a canvas element
- Guiding video encoding with content hints
RTCPeerConnection:
Controlling peer connectivity
- Basic peer connection demo in a single tab
- Basic peer connection demo between two tabs
- Peer connection using Perfect Negotiation
- Audio-only peer connection demo
- Change bandwidth on the fly
- Change codecs before the call
- Upgrade a call and turn video on
- Multiple peer connections at once
- Forward the output of one PC into another
- Munge SDP parameters
- Use pranswer when setting up a peer connection
- Constraints and stats
- RTCPeerConnection and requestVideoFrameCallback()
- Display createOffer output for various scenarios
- Use RTCDTMFSender
- Display peer connection states
- ICE candidate gathering from STUN/TURN servers
- Do an ICE restart
- Web Audio output as input to peer connection
- Peer connection as input to Web Audio
- Measure how long renegotiation takes
- Choose scalablilityMode before call - Scalable Video Coding (SVC) Extension
RTCDataChannel:
Send arbitrary data over peer connections
Video chat:
Full featured WebRTC application
- AppRTC video chat client that you can run out of a Docker image
Insertable Streams:
API for processing media
- End to end encryption using WebRTC Insertable Streams (Experimental)
- Video analyzer using WebRTC Insertable Streams (Experimental)
- Video processing using MediaStream Insertable Streams (Experimental)
- Audio processing using MediaStream Insertable Streams (Experimental)
- Video cropping using MediaStream Insertable Streams in a Worker (Experimental)
- Integrations with WebGPU for custom video rendering: (Experimental)