How webrtc/samples works
WebRTC Code Samples is a browser-based collection of independent JavaScript demonstrations, not one integrated application. A user opens a sample and exercises a specific browser media or networking capability; the result is a live stream, peer connection, data-channel exchange, or processing effect. The graph groups the major sample families and highlights the internal video-processing pipeline where the excerpts show actual orchestration. Most samples are independent, so no links between them are inferred. The README establishes how users access the samples; unsampled implementations are represented by their existing directories.
Main entry points: pipeline.js Video Pipeline · peerconnection Connection Controls · peer.js Peer Negotiation · content Sample Collection
Components 18
Media Capture
- Media Acquisition
src/content/getusermedia - Canvas and Video Capture
src/content/capture
Peer Connections
- Peer Negotiation
src/content/peerconnection/perfect-negotiation/js/peer.js - Connection Controls
src/content/peerconnection - Media Connections
src/content/peerconnection/audio/js/main.js - Bandwidth and Stats
src/content/peerconnection/bandwidth/js/main.js - Negotiation Timing
src/content/peerconnection/negotiate-timing/js/main.js - ICE Gathering
src/content/peerconnection/trickle-ice/js/main.js
Data Channels
- Data Channel Samples
src/content/datachannel - Channel Messaging
src/content/datachannel/messaging/main.js
Stream Processing
- Insertable Streams
src/content/insertable-streams - Video Pipeline
src/content/insertable-streams/video-processing/js/pipeline.js - WebGPU Processing
src/content/insertable-streams/webgpu - End-to-End Encryption
src/content/insertable-streams/endtoend-encryption/js/main.js
Devices and Extensions
- Device Selection
src/content/devices - Scalable Video Coding
src/content/extensions/svc/js/main.js
Other components
- Browser User
- Sample Collection
src/content
Connections 4
- Browser User → Sample Collection: opens samples
- Video Pipeline → Video Pipeline: starts source, transform, and sink
src/content/insertable-streams/video-processing/js/pipeline.js - Video Pipeline → Video Pipeline: passes processed stream
src/content/insertable-streams/video-processing/js/pipeline.js - Connection Controls → Peer Negotiation: delegates negotiation
src/content/peerconnection/perfect-negotiation/js/main.js