Questions tagged [webrtc]

WebRTC is a free, open project providing browsers and mobile applications with Real-Time Communications (RTC) capabilities (audio, video, and binary data streaming) via simple APIs and common set of protocols. Tags for operating environment may be helpful, e.g. [node.js] or [reactjs] or [ios] as well as specific browser, e.g. [firefox]. Questions concerning Session Description Protocol use [sdp]. Use [ortc] for Object RTC.

WebRTC offers web application developers the ability to write rich, real-time multimedia applications (think video chat) on the web, without requiring plugins, downloads, or installs. Its purpose is to help build a strong RTC platform that works across multiple web browsers, across multiple platforms.

WebRTC API support and implementations vary, widely, across browsers and operating systems. There is at least some support (as of late 2019) in up-to-date versions of most browsers. canIUse.com for WebRTC tracks the latest levels of support. Please, when asking questions about WebRTC here on Stack Overflow, mention your OS and browser by version.

Resources to learn simple examples

8953 questions
30
votes
3 answers

Navigator.mediaDevices.getUserMedia not working on iOS 12 Safari

As of iOS 12, navigator.mediaDevices.getUserMedia() is returning an error in Safari. To recreate this, open iPhone Web Inspector, then run this snippet in the console: var constraints = { audio: true, video: { width: 1280, height: 720 } };…
Severisth
  • 421
  • 1
  • 4
  • 4
30
votes
7 answers

DOMException: Error processing ICE candidate

I get this error DOMException: Error processing ICE candidate when I try to add an ice candidate. Here's the candidate: candidate:1278028030 1 udp 2122260223 10.0.18.123 62694 typ host generation 0 ufrag eGOGlVCnFLZYKTsc network-id 1 Moreover,…
Evaldas Raisutis
  • 1,628
  • 4
  • 18
  • 32
29
votes
2 answers

UseEffect hook with socket.io state is not persistent in socket handlers

I have the following react component function ConferencingRoom() { const [participants, setParticipants] = useState({}) console.log('Participants -> ', participants) useEffect(() => { // messages handlers …
Mo Hajr
  • 1,253
  • 1
  • 15
  • 31
28
votes
2 answers

How to implement 3-way conference call video chat with WebRTC Native Code for Android?

I'm trying to implement 3-way video chat inside an Android app using the WebRTC Native Code package for Android (i.e. not using a WebView). I've written a signalling server using node.js and used the Gottox socket.io java client library inside the…
samgak
  • 23,944
  • 4
  • 60
  • 82
28
votes
1 answer

Current State of Javascript WebRTC Libraries?

I want to know that which framework or library is best to use WebRTC. Here is a small and incomplete list of libraries/SDK out there. Any lib that I forgot, feel free to let me…
Nildarar
  • 802
  • 1
  • 8
  • 17
28
votes
3 answers

How to avoid echo and noise in javascript for webrtc

I am trying to implement a webrtc-based chat room. And I encountered the following problems in laptop. Without connecting to any other peer, just use getUserMedia(), I can get local video stream. When I unmuted the
Zhenguo Yang
  • 3,800
  • 5
  • 18
  • 22
28
votes
5 answers

WebRTC: peer connections limit?

How many peer connections can I create on a single client? Is there any limit?
kongaraju
  • 9,344
  • 11
  • 55
  • 78
28
votes
3 answers

WebRTC: How to add stream after offer and answer?

I am working on webRTC video calling. I got datachannel successfully implemented. Now I would like to add video stream to the same peer connection. I have read that stream should be added before answer and offer. Is there a way to add stream after…
kongaraju
  • 9,344
  • 11
  • 55
  • 78
27
votes
1 answer

streaming getUserMedia to server

I'm new to binary data and getUserMedia, what would be the recommended way to stream getUserMedia (video/audio) to a server and then prepare the stream (video/audio) for other connections? My initial thought was to send the data over websockets and…
8eecf0d2
  • 1,569
  • 1
  • 13
  • 23
27
votes
2 answers

Is WebRTC really peer-to-peer protocol?

WebRTC is a peer-peer communication protocol. I wonder, is it really peer-peer if it does require a web server? For example, to create a "room" one has to create it at apprtc.appspot.com or https://hello.firefox.com/something.
Incerteza
  • 32,326
  • 47
  • 154
  • 261
27
votes
5 answers

Detecting that the peer's browser was closed in a webrtc videochat

I've been implementing a webrtc videochat. Everything is working smoothly except for the case when the peer closes the browser. I've been trying to handle this event by implementing an onended callback on the remote mediastream. Though, this…
Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
27
votes
16 answers

WebRTC on a standalone mobile app

I know that WebRTC was designed for browsers, but is it possible to use WebRTC libraries on mobile applications directly? Thanks!
Taras
  • 2,526
  • 3
  • 33
  • 63
26
votes
2 answers

Failed to set local answer sdp: Called in wrong state: kStable

for a couple of days I'm now stuck with trying to get my webRTC client to work and I can't figure out what I'm doing wrong. I'm trying to create multi peer webrtc client and am testing both sides with Chrome. When the callee receives the call and…
Eric Xyz
  • 452
  • 1
  • 5
  • 14
26
votes
1 answer

How to share & WebRTC stream from /dev/videoX device from a Chromium on host and Chromium in a docker container

Environment Host running Ubuntu 14.04.5 LTS Docker version 17.09.0-ce, build afdb6d4 Chromium 62.0.3202.89 2 webcams: /dev/video0, /dev/video1 Cameras # v4l2-ctl --list-devices Venus USB2.0 Camera (usb-0000:00:1a.0-1.2.2): /dev/video1 USB 2.0…
zabumba
  • 12,172
  • 16
  • 72
  • 129
26
votes
3 answers

WebRTC: Matching up nearest peers

Given a single public IP address (peer A) and a list of many other public IP addresses (a mix of IPv4 and IPv6 addresses), what is the easiest way to match up peer A the IP addresses of the n nearest peers without having the peers manually ping each…
Eli Grey
  • 35,104
  • 14
  • 75
  • 93