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
302
votes
8 answers

WebRTC vs Websockets: If WebRTC can do Video, Audio, and Data, why do I need Websockets?

So I'm looking to build a chat app that will allow video, audio, and text. I spent some time researching into Websockets and WebRTC to decide which to use. Since there are plenty of video and audio apps with WebRTC, this sounds like a reasonable…
1ManStartup
  • 3,716
  • 4
  • 21
  • 26
252
votes
17 answers

Stop/Close webcam stream which is opened by navigator.mediaDevices.getUserMedia

I opened a webcam by using the following JavaScript code: const stream = await navigator.mediaDevices.getUserMedia({ /* ... */ }); Is there any JavaScript code to stop or close the webcam?
Shih-En Chou
  • 4,007
  • 6
  • 20
  • 27
134
votes
6 answers

How to access camera on iOS11 home screen web app?

Summary We cannot access camera from an iOS11 (public release) home screen web app using either WebRTC or the file input, details below. How can our users continue to access the camera please? We are serving the web app page over https. Update,…
ajayel
  • 3,027
  • 2
  • 26
  • 33
134
votes
9 answers

WebRTC - scalable live stream broadcasting / multicasting

PROBLEM: WebRTC gives us peer-to-peer video/audio connections. It is perfect for p2p calls, hangouts. But what about broadcasting (one-to-many, for example, 1-to-10000)? Lets say we have a broadcaster "B" and two attendees "A1", "A2". Of course it…
igorpavlov
  • 3,576
  • 6
  • 29
  • 56
109
votes
6 answers

reprompt for permissions with getUserMedia() after initial denial

How do we go about requesting camera/microphone access with getUserMedia() after being denied once? I'm working with getUserMedia to access the user's camera and pipe the data to a canvas. That bit all works fine. In testing, I hit deny once. At…
Geuis
  • 41,122
  • 56
  • 157
  • 219
102
votes
1 answer

Does WebRTC use TCP or UDP?

I have some questions about WebRTC: Does WebRTC use TCP or UDP as its peer-to-peer transport? How can I know? I read that there are reliability mode and DTLS agreement, how does these affect? Is this transport the same for both Media and…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
102
votes
9 answers

How to record webcam and audio using webRTC and a server-based Peer connection

I would like to record the users webcam and audio and save it to a file on the server. These files would then be able to be served up to other users. I have no problems with playback, however I'm having problems getting the content to record. My…
Dave Hilditch
  • 5,299
  • 4
  • 27
  • 35
88
votes
3 answers

What are ICE Candidates and how do the peer connection choose between them?

I newly wrote a simple chat application, but I didn't really understand the background of ICE Candidates. When the peer create a connection they get ICE Candidates and they exchange them and set them finally to the peerconnection. So my question is,…
user1844505
  • 1,259
  • 2
  • 10
  • 14
77
votes
5 answers

How does WebRTC work?

I'm interested in Peer-to-Peer connections in the browser. Since this seems to be possible with WebRTC, I'm wondering how it works exaclty. I've read some explanations and saw diagrams about it and now it's clear to me, that the connection…
Van Coding
  • 24,244
  • 24
  • 88
  • 132
69
votes
7 answers

Is it possible to use WebRTC to streaming video from Server to Client?

In WebRTC, I always see the implementation about peer-to-peer and how to get video streaming from one client to another client. How about server-to-client? Is it possible for WebRTC to streaming video file from server-to-client? (I am thinking…
A-letubby
  • 8,474
  • 8
  • 38
  • 48
64
votes
2 answers

WebRTC AGC (Automatic Gain Control)

I am testing the WebRTC AGC but I must be doing something wrong because the signal just passes through unmodified. Here's how I create and initialize the AGC: agcConfig.compressionGaindB = 9; agcConfig.limiterEnable = 1; agcConfig.targetLevelDbfs =…
user1884325
  • 2,530
  • 1
  • 30
  • 49
62
votes
10 answers

STUN/TURN server connectivity test

I am trying to figure out how to test whether a STUN/TURN server is alive and properly responding to connections. Ideally this test would be performed from an external machine, just in case the STUN/TURN machine is down for this case should also be…
mirazour
  • 723
  • 1
  • 6
  • 7
61
votes
4 answers

NodeJS and RED 5 media server via RTMP

This is more a conceptual question rather than a direct "how to do this". Is it generally possible to implement a flash-like solution to stream the audio (independent of where we get the stream data from, e.g. webRTC or other) in HTML5 and…
toxicate20
  • 5,270
  • 3
  • 26
  • 38
58
votes
4 answers

Sending a MediaStream to host Server with WebRTC after it is captured by getUserMedia

I am capturing audio data using getUserMedia() and I want to send it to my server so I can save it as a Blob in a MySQL field. This is all I am trying to do. I have made several attempts to do this using WebRTC, but I don't even know at this point…
Jimmery
  • 9,783
  • 25
  • 83
  • 157
58
votes
1 answer

Create a WebRTC VideoTrack with a "custom" Capturer on Android with libjingle

How to use a "custom" video capturer to create a VideoTrack and provide frames? The classic approach to create a VideoTrack is: 1 - Get a VideoCapturer instance VideoCapturer capturer = VideoCapturer.create(name); 2 - Create a…
Manza
  • 3,427
  • 4
  • 36
  • 57
1
2 3
99 100