WebRTC – scalable live stream broadcasting / multicasting

As it was pretty much covered here, what you are trying to do here is not possible with plain, old-fashionned WebRTC (strictly peer-to-peer). Because as it was said earlier, WebRTC connections renegotiate encryption keys to encrypt data, for each session. So your broadcaster (B) will indeed need to upload its stream as many times as … Read more

How can I make Chrome allow access to a webcam over http (not https)?

Yes, an admin can override the prompts with a policy. VideoCaptureAllowedUrls Patterns in this list will be matched against the security origin of the requesting URL. If a match is found, access to audio capture devices will be granted without prompt. NOTE: This policy is currently only supported when running in Kiosk mode. On Windows, … Read more

How to use WebRTC to stream video to RTMP?

For RTSP<->WebRTC / RTMP<->WebRTC conversions, you need to run some kind of WebRTC gateway / media server software that works with all these formats/protocols and can transmux between all of them. Try Wowza / Unreal Media Server / Flashphoner. https://en.wikipedia.org/wiki/Comparison_of_streaming_media_systems So in your case you want to publish the screen from browser to media server … Read more

How to addTrack in MediaStream in WebRTC

Update: working example near bottom. This depends greatly on which browser you are using at the moment, due to an evolving spec. In the specification and Firefox, peer connections are now fundamentally track-based, and do not depend on local stream associations. You have var sender = pc.addTrack(track, stream), pc.removeTrack(sender), and even sender.replaceTrack(track), the latter involving … Read more

STUN/TURN server connectivity test

Edit: A nice implementation in github.io taken from comment to another answer( choose “relay” in IceTransports value): Test TURN Server following Benjamin Trent’s advice, I wrote the below code to test TURN server’s connectivity, works on both firefox n chrome: function checkTURNServer(turnConfig, timeout){ return new Promise(function(resolve, reject){ setTimeout(function(){ if(promiseResolved) return; resolve(false); promiseResolved = true; }, … Read more

WebRTC video is not displaying

It’s outdated code. It contains 6 problems that track the evolution of the WebRTC API. TL;DR: It doesn’t work because you’re not checking for errors and you’ve only tested one browser. 1) Old vendor prefixes (remove them): yourConnection = new RTCPeerConnection(configuration); theirConnection = new webkitRTCPeerConnection(configuration); // <– wrong webkit-names won’t work in Firefox or Edge. … Read more

how to make getUserMedia() work on all browsers

The issue is not just the prefixed function name; the stream provided works differently in different browsers. Here, I’ll walk you through it. I assume you’ve already set up a video element in the variable called video. //I don’t usually like to overwrite publicly accessible variables, but that’s just me var getUserMedia = navigator.getUserMedia || … Read more