Programming WebRTC (Pragmatic Bookshelf)

PragmaticBookshelf
Use WebRTC to build web applications that stream media and data in real time directly from one user to another, all in the browser.

Karl Stolley @karlstolley

edited by Michael Swaine @michaelswaine

Build your own video chat application—but that’s just the beginning. With WebRTC, you’ll create real-time applications to stream any kind of user media and data directly from one browser to another, all built on familiar HTML, CSS, and JavaScript. Power real-time activities like text-based chats, secure peer-to-peer file transfers, collaborative brainstorming sessions—even multiplayer gaming. And you’re not limited to two connected users: an entire chapter of the book is devoted to engineering multi-peer WebRTC apps that let groups of people communicate in real time. You’ll create your own video conferencing app. It’s all here.

WebRTC is an API exposed in all modern web browsers. After almost a decade of development, the WebRTC specification was finalized, and this book provides faithful coverage of that finalized specification. You’ll start by building a basic but complete WebRTC application for video chatting. Chapter by chapter, you’ll refine that app and its core logic to spin up new and exciting WebRTC-powered apps that will have your users sharing all manner of data with one another, all in real time. No third-party libraries or heavy downloads are required for you or your users: you’ll be writing and strengthening your knowledge of vanilla JavaScript and native browser APIs.

You’ll learn how to directly connect multiple browsers over the open internet using a signaling channel. You will gain familiarity with a whole set of Web APIs whose features bring WebRTC to life: requesting access to users’ cameras and microphones; accessing and manipulating arbitrary user files, right in the browser; and web storage for persisting shared data over the life of a WebRTC call. Like any Web API, WebRTC doesn’t enjoy a perfect implementation in any browser. But this book will guide you in writing elegant code to the specification, with backward-compatible fallback code for use in almost all modern browsers.

Use WebRTC to build the next generation of web applications that stream media and data in real time, directly from one user to another—all by working in the browser.


Karl Stolley is an associate professor of information technology and management at Illinois Institute of Technology in Chicago. He’s been teaching, researching, and practicing web development up and down the stack since the blink tag was still a thing. He’s a frequent speaker at national and international conferences, and a routine presenter and participant in professional developer groups and meetups in Chicago.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

27 1762 7

Latest Threads About This Book Top

mehagar
@karlstolley In the “Sharing Features Over Data Channels” section there is this example code: const​ featureFunctions = { ​ audio: ​fu...
0 13 0
New
mehagar
In P1.0 of this book, in the "Wiring up the A/V Toggle Logic in JavaScript, it says: “The toggleVideo() function is almost identical to ...
0 6 0
New
mehagar
@karlstolley In P1.0 of the book (I’m reading on Kindle so not sure what page number), the “Sharing Features over Data Channels section”...
0 5 0
New
KenWhitesell
@karlstolley Last line of the blue note box: “perviously” → should be “previously”.
0 216 1
New
huynh
@karlstolley I want to run the signaling server and the front-end (e.g., basic_p2p app) on separate ports. From the client side, I get ...
0 283 1
New
deepaksathya
@karlstolley The instructions for starting the server is given. If a user doesn’t know how node.js works he/she will not be able to star...
0 397 1
New
iPaul
Windows 11 fully updated, added openssl to the PATH, node also installed. When running command: npm run ssl-keys --keydir=“C:\dev\Certs”...
0 687 3
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
31 3516 17
New
sabavidyo
Hello Karl @karlstolley, In the section called “Finding Your Way Around the Code Directory” you write: “…you can simply run npm start o...
0 558 5
New
garethnic
Programming WebRTC - ‘Preface’ words are swapped (page 9) Second paragraph, second sentence: “But this will book start you on your journ...
0 705 1
New

Most Active This Week Top

Most Active This Month Top

Most Active This Year Top

deepaksathya
@karlstolley The instructions for starting the server is given. If a user doesn’t know how node.js works he/she will not be able to star...
0 397 1
New
KenWhitesell
@karlstolley Last line of the blue note box: “perviously” → should be “previously”.
0 216 1
New
mehagar
@karlstolley In the “Sharing Features Over Data Channels” section there is this example code: const​ featureFunctions = { ​ audio: ​fu...
0 13 0
New
mehagar
In P1.0 of this book, in the "Wiring up the A/V Toggle Logic in JavaScript, it says: “The toggleVideo() function is almost identical to ...
0 6 0
New
mehagar
@karlstolley In P1.0 of the book (I’m reading on Kindle so not sure what page number), the “Sharing Features over Data Channels section”...
0 5 0
New

Most Active Last Three Years Top

PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
31 3516 17
New
iPaul
Windows 11 fully updated, added openssl to the PATH, node also installed. When running command: npm run ssl-keys --keydir=“C:\dev\Certs”...
0 687 3
New
garethnic
Programming WebRTC - ‘Preface’ words are swapped (page 9) Second paragraph, second sentence: “But this will book start you on your journ...
0 705 1
New
huynh
@karlstolley I want to run the signaling server and the front-end (e.g., basic_p2p app) on separate ports. From the client side, I get ...
0 283 1
New
sabavidyo
Hello Karl @karlstolley, In the section called “Finding Your Way Around the Code Directory” you write: “…you can simply run npm start o...
0 558 5
New

Most Active Over Three Years Top

PragmaticBookshelf
Use WebRTC to build web applications that stream media and data in real time directly from one user to another, all in the browser. ...
27 1762 7
New
filipp
Comments in the example code refer to “https://pragprog.com/titles/ksrtc/programming-webrtc/”. The correct URL is “Programming WebRTC: Bu...
0 935 1
New
filipp
“all of which are orbit around” → “all of which orbit around” "data between two peers, all it real time” → "data between two peers, all ...
0 871 1
New
filipp
“the in stress-relief” > “in the stress-relief”
0 851 1
New
New
perlundholm
#book-programming-webrtc Just started reading this and tried starting the server but it starts with http. code> npm start **signali...
0 756 2
New
filipp
Hi Karl! Thanks for this very informative, timely and well-written book. I’m really looking forward to the completed first edition. Her...
1 762 1
New
filipp
“browser will only the show very first frame” → “browser will only show the very first frame”
0 816 1
New
New
filipp
“doesn’t matter much when the is button” → “doesn’t matter much when the button is ”
0 781 1
New
filipp
“Although self-signed certificates not suited for ” → “Although self-signed certificates are not suited for ”
0 745 1
New

Book Info

Publisher: Pragmatic Bookshelf
Tag: #book-programming-webrtc
Threads: 21

Are you this book's author? To be notified of all posts made about it, sign up an account then click here, then select 'watching' from the bell icon in the top right corner.

Get money off!

The Pragmatic Bookshelf

35% off any eBook

Simply use coupon code "devtalk.com" at checkout. See full details here.