WebRTC Samples
webrtc.github.io
webrtc.github.io
If you are interested in WebRTC out of the browser there are lots of implementations and servers! I am also working on a book 'WebRTC for the Curious'[0] that tries to explain the protocol and the history behind it.
For other WebRTC implementations check out.
* https://github.com/aiortc/aiortc
* https://github.com/shinyoshiaki/werift-webrtc
* https://github.com/rawrtc/rawrtc
* https://gstreamer.freedesktop.org/documentation/webrtc/index...
There is also https://github.com/node-webrtc/node-webrtc this takes Google's WebRTC implementation (used in Chromium) and throws a node.js API on top of it!
Is this still the case? Would you still hypothetically see better audio performance of something like Discord in a standalone app?
I am sure there are other issues as well. The WebRTC implementation in Chromium is controlled by Google (they have all the commit bits). If they don't agree with your change it isn't going to land. It's a tough position to be in for other businesses and Open Source projects even.
enumerateDevices() should enumerate audio output devices (feature behind pref): https://bugzilla.mozilla.org/show_bug.cgi?id=1152401
Enable by default setSinkId pref: https://bugzilla.mozilla.org/show_bug.cgi?id=1498512
Alex Chronopoulos: "We keep it off because it does not work for everything. It works when we playback a file but not for webaudio or WebRTC. We want to add those too and we keep it off till then."
Or is the WebRTC subset/combination of these standards sufficiently different better described as its own protocol?
One nice thing is that the protocol is less flexible. The clients are expected to support NACK, Congestion Control and some other stuff.
I haven't done SIP stuff in 10 years. I just remember you had lots of variety between who you interacted with. Maybe this has gotten better!
Out of curiosity: It seems like the communication protocol that's used is RTP and RTCP. And it seems that these work quite well for video and audio streaming. However what if I want to do real time streaming of a custom binary protocol? Like, say, accelerometer data from a robot or similar.
Would the best bet be to attempt to make the protocol RTP and RTCP conformant or would it be possible to make a custom fork of WebRTC which supports custom protocols at the communication layer?
You just need watch CPU Usage and Network attributes (loss, congestion etc...) Getting this right will take a little bit of WebRTC knowledge. Happy to answer any specific questions :)
There are also lots of hosted options as well! Real world WebRTC has a few different parts though, https://bloggeek.me/webrtc-server/ is a good intro I think.
https://github.com/meetecho/janus-gateway
We have upwards of 100 simultaneous users on it every day, and at the moment it seems to be 100% reliable.
https://www.mizu-voip.com/Software/WebRTCtoSIP.aspx
It has a nice config wizard and built-in STUN and TURN server.
Some companies have decided to roll their own, https://webrtchacks.com/zoom-avoids-using-webrtc/ is a cool read.
But for group conversation this won't scale because with p2p (mesh network) WebRTC, each client has to encode and decode for all users (which might be too much processing to do for the client).
For that reason many group video conf apps use a centralized router when there are several people.
Privacy then becomes an issue, and all group video conf such as Zoom, Skype, etc. are basically unencrypted (not end-to-end) and they can see & log everything (your face, your voice, chat, files exchanged, etc.) because the centralised router routes non-encrypted streams.
Jitsi is going to be an exception by adding a layer of encryption using insertable streams (https://jitsi.org/blog/e2ee/).
So in summary I'd say :
- for 1-to-1 or a few more people go with normal p2p WebRTC.
- for multiple people session, host your own Jitsi server (or rent one from 8x8 or other providers) & use the jitsi SDK/API to integrate it in your app
IMO, don't forget to look at things like TokBox (Vonage), Twilio, and Agora. If you're just trying to get an MVP/POX, it's a lot easier to start with someone's API, then dig deeper into the details when you're ready.
WebRTC has some difficult-to-debug corner cases that these and APIs already handle for you. (Today I had to convince the boss to try one of the APIs for an MVP because I hit a bug where Chrome and Edge just stopped listening to the microphone. Thanks to these samples, I learned it wasn't our code.)
I routinely hit it to validate my camera/audio options and confirm the audio is sounding good.
[1] https://github.com/feross/simple-peer
[2] https://github.com/justo-rivera/dibujio-client
Ps. Be sure to use a turn server besides a stun one, that was a big headache to get it working on mobile data
I’m glad people are using the data channel for games; I always see people say “well we could have better networking but browsers only support TCP sockets” but that is not the case.
The most complicated bit is you will need TURN servers for some symmetric NAT cases; either host your own or use something like https://xirsys.com/