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
53
votes
4 answers

WebRTC and Websockets. Is there a difference

I'm assuming that WebRTC is an API that decodes/encodes audio and video, although the communication between the server and the clients is done via web sockets, or some other network protocol? I'm a bit confused. Does WebRTC have its own…
AndrewMcLagan
  • 13,459
  • 23
  • 91
  • 158
51
votes
3 answers

How to do network tracking or debugging WebRTC peer-to-peer connection

I am wondering that there is the tool or any method I can see what underlying WebRTC peer-to-peer connection? For simple example, if I am implementing video chat using webrtc, all connection (offer, answer, ice) are established but I can't see the…
A-letubby
  • 8,474
  • 8
  • 38
  • 48
49
votes
8 answers

WebSocket connection failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I am new to WebRTC and WebSockets and was following this tutorial to create a WebRTC demo project, but I am unable to create a WebSocket connection. I have followed the same steps as mentioned in the project. His project is running on port 8080 and…
Hafsa
  • 521
  • 1
  • 5
  • 6
49
votes
9 answers

Get maximum video resolution with getUserMedia

I'm trying to get highest video resolution as possible through JS navigator.getUserMedia. I know about constraints, but don't know how to choose right in my case. The problem is looks like there is no way to say "I want a video at maximum…
homm
  • 2,102
  • 1
  • 16
  • 33
49
votes
3 answers

What is the difference between WebRTC and WebSockets for low level data communication

I am trying to understand the difference between WebRTC and WebSockets so that I can better understand which scenario calls for what. I am curious about the broad idea of two parties (mainly web based, but potentially one being a dedicated server…
lvicks
  • 735
  • 1
  • 5
  • 10
48
votes
9 answers

Node.js WebRTC client

I am looking for a webrtc implementation for node.js to transmit data from a nodeJS client to another webRTC peer. So in my case the nodejs application is not the server but a client. Does such a node module exist?
jantimon
  • 36,840
  • 23
  • 122
  • 185
47
votes
5 answers

Why is a signaling server needed for WebRTC?

WebRTC is a protocol that defines the transport method for media data between peer-to-peer. Understood. Also it works on top of RTP/UDP. This also understood. While getting the discussion about signalling server it is mentioned that it is required…
Whoami
  • 13,930
  • 19
  • 84
  • 140
46
votes
2 answers

WebRTC on isolated LAN without ice/stun/turn server

On an isolated LAN, is there any way that a WebRTC connection can be made simply with the IP addresses assigned by the DHCP server? I understand that I can accomplish this with Node.js and Socket.io - but I was really hoping to avoid setting up that…
brainBanter
  • 491
  • 1
  • 4
  • 8
46
votes
3 answers

what is STUN stun.l.google.com:19302 used for

I'm looking at the webrtc.html and peerconnection_server demo, and it is working fine between two Chrome browsers. My question is, what exactly is the first param of webkitPeerConnection ? pc = new webkitPeerConnection("STUN…
Vicky
  • 1,412
  • 4
  • 18
  • 30
45
votes
2 answers

Live Video Stream on a Node.js Server

I have been researching this a lot but am frustrated as I feel like the solution should be simple though I know wont be. Ideally i'd just want to use node to host the server, webrtc getusermedia to get the live stream on the local client and use…
joshy.poo
  • 573
  • 1
  • 5
  • 10
45
votes
4 answers

Which version of Microsoft Internet Explorer support WebRTC?

Update 2019: No IE actually supports WebRTC and no IE ever will. In 5 weeks Microsoft Edge will die and long live Chromium based Edge. That supports WebRTC. Chrome and Firefox both support WebRTC. Does Internet Explorer support it? Starting at…
Benjamin Gruenbaum
  • 270,886
  • 87
  • 504
  • 504
44
votes
7 answers

Is it possible to check if the user has a camera and microphone and if the permissions have been granted with Javascript?

I would like to find out if the user's device has an attached camera and microphone, and if so, has permissions been granted to get the audio and video stream using Javascript. I want to make this check to be made across Chrome and Firefox at the…
Amal Antony
  • 6,477
  • 14
  • 53
  • 76
42
votes
3 answers

navigator.mediaDevices is undefined

So I've made a WebRTC screen sharing app as a self-hosted alternative to Chrome Remote Desktop and other common remote desktop / game streaming services. My dilemma isn't navigator.mediaDevices undefinded. Whenever I launch the app over a file:///…
MilkyDeveloper
  • 608
  • 1
  • 6
  • 13
41
votes
1 answer

WebRTC can't get a video feed from a USB input device (readyState goes to ended)

I'm trying to use WebRTC to display a video input on-screen as a live feed. I'm not trying to do any peer-to-peer communications or anything like that, just display a video feed. The code I have works fine for my laptops integrated webcam, but when…
PulseLab
  • 1,577
  • 11
  • 15
41
votes
1 answer

Is WebRTC traffic over TURN end-to-end encrypted?

WebRTC traffic is encrypted using DTLS - ok. But what about traffic that's relayed over a TURN server? I'm looking for a reliable resource which confirms that the traffic is truly end-to-end encrypted (because "end-to-end" can sometimes mean…
Chris Lercher
  • 37,264
  • 20
  • 99
  • 131