Skip to main content

QuickRTC Architecture

QuickRTC is a high-level abstraction over mediasoup that simplifies WebRTC conferencing. This guide explains how QuickRTC works and how it differs from raw mediasoup.

The Problem QuickRTC Solves​

Using mediasoup directly requires managing many low-level details:

~500-1000 lines of boilerplate code required!

~50 lines of code. That's it!

Architecture Overview​

Package Structure​

QuickRTC consists of three packages:

Data Flow​

Join Conference Flow​

Produce Media Flow​

Auto-Consume Feature​

QuickRTC automatically creates consumers when new producers appear. You just listen to events:

No manual subscription needed!

Event System​

QuickRTC uses an event-driven architecture:

LocalStream Controls​

When you produce media, you get back LocalStream objects with built-in controls:

const streams = await rtc.produce(tracks);

streams.forEach(stream => {
console.log(stream.id); // Unique stream ID
console.log(stream.type); // "audio" | "video" | "screenshare"
console.log(stream.stream); // MediaStream object
console.log(stream.track); // MediaStreamTrack

// Controls
stream.pause(); // Pause sending (receivers see frozen frame)
stream.resume(); // Resume sending
stream.stop(); // Stop completely (removes producer)
});

Complete Integration Example​

QuickRTC vs Raw mediasoup​

FeatureRaw mediasoupQuickRTC
Lines of code500-100050-100
Transport managementManualAutomatic
Consumer creationManualAutomatic
Event handlingLow-levelHigh-level
Learning curveSteepGentle
FlexibilityMaximumOpinionated
Use caseCustom solutionsStandard conferencing

When to Use QuickRTC​

Use QuickRTC when:

  • Building standard video conferencing
  • You want rapid development
  • You don't need custom media routing
  • You're building with React

Use raw mediasoup when:

  • You need custom routing logic
  • Building broadcast/streaming apps
  • You need fine-grained control
  • Building non-standard WebRTC apps

Next Steps​