A real world guide to WebRTC
deepstreamhub.com
deepstreamhub.com
In the end we managed to get something smooth working with UV4L[1] on a RPi costing us a fraction of the previous solution.
[0] http://numb.viagenie.ca/ has a free one
Actually, you can make poor human to do signalling servers work: http://blog.printf.net/articles/2013/05/17/webrtc-without-a-...
But I guess you'd still need a STUN server?
But I have the feeling, most WebRTC stuff is badly documented, proprietary and/or outdated.
The signalling server, though, just copies information about each peer to the other. Technically, you could transfer it any way you like - by carrier pigeon or through js-libp2p.
a) client and server that only use the WebRTC data connection for low latency UDP based communications
b) a p2p example for a group of clients using WebRTC data connection
This website seems to cover b) but not a)
The example in my blog post isn't really minimal because it assumes that you're writing your server in C++ for performance reasons. You can cut away a lot of the setup and boilerplate if you're fine with your server running on node and delegating all WebRTC tasks to a background electron process (see electron-webrtc).
Also, recently Mozilla has released their own WebRTC abstraction (https://hacks.mozilla.org/2017/06/introducing-humblenet-a-cr...) which seems to be easy to use on the server. I personally haven't tried it yet, but I've heard good things.
It's a minimal WebRTC server implementation (SDP, STUN, SCTP, DTLS and everything else) contained in a single library. Note that it only implements a subset of the specs to get it working and probably still is buggy (experimental!) as I'm developing it while working on another project that uses it.
In case you want to do chunked data channel transfers but don't want to implement the chunking yourself, I wrote a library to do just that: https://www.npmjs.com/package/@saltyrtc/chunked-dc It's based on this specification: https://github.com/saltyrtc/saltyrtc-meta/blob/master/Chunki...
As it is, in Chrome, if you let a webpage access your camera (or mic) that page gets permanent permission to access the camera whenever it wants forever, no questions asked again. I recently visited one of the early HTML5 Webcam demos that I hadn't visited in over two years. I expected to get asked for permission to access the camera. Instead the camera just came on. That is NOT a good model for web sites that are covered in ads and scripts from all over the net.
I'm sure Google was thinking of supporting hangouts when designing webcam support and for the most part I agree that if hangouts always had access to the camera that might be no worse than a native app. But, it's the browser it's not a native app, it's untrusted code.
Even for communications sites though if I run them in an iframe they get camera permission. In other words, say yes just once and now that domain can follow you all over the net and use your camera, at least as of Chrome 59.
I don't know what the best permission UX is. Always asking seems lame for actual communication websites (messenger, hangouts, slack?, ...) but not asking sucks for the open web. It even sucks on a communications website if the camera feature is not something I use often. I don't want any app to have permission to spy on me. I personally want to opt-in to always ask. I'd prefer this even in native apps but especially for the web.
https://greggman.github.io/doodles/html5-webcam-iframe.html
PS: I filed a bug on this about 5 months ago but no word
https://bugs.chromium.org/p/chromium/issues/detail?id=687834
For mobile, it looks like you can hit the vertical menu button in the top right, then the (i) icon, then Site Settings...
Site settings: http://imgur.com/a/JIDeD (note: camera is set to 'block', but there is still the red dot in tab indicating camera access)
Camera usage: http://imgur.com/a/3HXHo (note: different domain listed)
Firefox asks if you would like to remember allowing camera access (this appears to be respected when refreshing the page):
Chrome does not:
I get the feeling camera access should always ask from an iframe period. There should be no "always allow" from iframes.
On top of that, given that many pages use 3rd party scripts from CDNs etc I feel like it's pretty dangerous to give any site permanent permission to access the camera/mic.
As mentioned in the article already, P2P is quite heavy to scale (one-to-many streaming) so you will likely need centralisation. WebRTC is also fragile in the wild due to NAT. Wowza would split the NAT problem into smaller pieces at least.
Not involved with the product, just really excited about it.
https://www.wowza.com/products/capabilities/webrtc-streaming...
And we have an opening for experienced NodeJs backend guys. We'll give you opportunity to transition in WebRTC role as well.
If interested and experience in NodeJs ecosystem please forward your CV to mail ( at ) khandagale.com while mentioning HN in title.
Position Location: Remote/India Min exp needed: 2+ yrs
After some googling I found OpenWebRTC which says "WebRTC standard would transcend the pure browser environment and that native apps, implementing the same protocols and API's, would become an important part of the WebRTC ecosystem". But I thought the beauty of this would be transcending the need for native apps.
> But I thought the beauty of this would be transcending the need for native apps.
Right now the only implementations of webrtc are web browsers so if you want to use webrtc on a server you have to run a browser environment like electron.
Wait, that's not right, is it? There is a native implementation for iOS for example (demoed in this app: https://github.com/ISBX/apprtc-ios)
There are two webrtc implementations that I know of google's native implementation from chromium and openwebrtc. That project uses google's.
It'll be supported on iOS with iOS 11 later this year.
Here about IOS 11: https://www.quobis.com/2017/06/08/webrtc-ios11/
And if you want to test the WebRTC solution, I think that Jitsi is one of the best solutions, and it's open-source.
Regards
var mediaConstraints = { video: { mozMediaSource: "screen", mediaSource: "screen" } };
Alternatively, replace "screen" with "window" to share an individual window. (Unfortunately there is no single constraint that will allow the user to choose either window or screen, as there is on Chrome).
var conversation = new dataChannel("Chat") // if 'Chat' is valid then join 'Chat' else create a new connection
if (conversation.init) {
onConversation.receive(fn); // some event model
conversation.send("Hi");
// some receive fn...
}How the hell do I turn it off in all my browsers?