I currently trying to get Edge working. With our Janus webrtc server. The video works fine, only the audio suffers a lot of echo and makes a conversation impossible.
Tried to set the getUserMedia audio constrains but it didn't help
audio: {
echoCancellation: true,
autoGainControl: true,
noiseSuppression: true
}
Does anybody have a solution?
Update 21-11-18:
Results of the fiddle of #jib
I also created a screenshot from MediaDevices.getSupportedConstraints()
Based on the 2 previous examples you would say echo cancelation is not working on Edge. But I noticed on appear.in on there free version echo cancelation is working. I've tested between Edge and Chrome. As far as I understand appear.in free version uses peer connection (mesh) and not a server in between. As we are doing with Janus webrtc server.
According to the initial announcement echoCancellation is a "missing feature" in Edge. A quick look in their issue tracker did not reveal any open issues.
You can verify whether it is working by clicking the "Result" tab in this blog.
Related
Currently WebRTC fails on Brave browser with "Autoplay was blocked on this page" error.
This error is not particularly visible:
You can test it with Brave browser where any WebRTC is enabled, e.g. https://test.webrtc.org/.
My app users are reporting this as a bug – since their experience is that the video is just not loading.
What is the proper way to handle this?
https://webrtchacks.com/autoplay-restrictions-and-webrtc/ has quite some (still valid) suggestions. Checking the audiocontexts state as suggested here (linked from a comment) is probably the way to go.
It is rather surprising that brave does this, chrome does allow autoplay when getUserMedia is active.
I am trying to make a one to one audio call using webRTC.
I have been looking through some of the source code on https://github.com/shanet/WebRTC-Example/blob/master/client/webrtc.js but I realized it has a middle man "iceServers" located at.
var peerConnectionConfig = {
'iceServers': [
{'urls': 'stun:stun.services.mozilla.com'},
{'urls': 'stun:stun.l.google.com:19302'},
]
};
I need my software to work when two peers are connected on the same network without internet connection. Could someone help me locate some examples or ideas if webRTC is possible?
Thank you.
Yes. It is possible. Just set the ice servers to an empty array (remove the stun and the turn servers) and all should be fine on a local network.
Take care about Chrome HTTPS/WSS requirements (Chrome will not allow the media permission if your website is not on HTTPS which is a bit difficult to setup on a local LAN without any internet connection). Firefox and Edge doesn't have such requirements.
I am trying to make an online examination portal. When students start the exam, their webcam will start automatically and record the stream live and store in the server. Invigilators will either watch the students live or they can watch the saved live streams later.
I researched about this and found WebRTC as a possible solution along with a gateway server like Kurento. But later found out that WebRTC is not supported in Safari, which is a setback! My application should run successfully in web portal in any modern browsers which includes safari and also in android or iphone.
So can anyone suggest a possible solution to my problem? Which technology should I use that can support all browsers and OS?
Also, it would be helpful if you can provide links to good documentation or tutorials.
Note from the future (2020): This answer really isn't accurate anymore.
WebRTC is one problem... capture from the camera with getUserMedia is another. Safari doesn't support either.
There is no video capture API in Safari currently. The only thing you can do is make a native app for iOS.
Worse yet, because of Apple's restrictive policies, alternative browsers, such as Chrome, are crippled on iOS as they aren't allowed to use their own browser engines.
Use standards based technologies like getUserMedia and WebRTC for your primary web-based application. If you decide that the economics of your situation enable it, you can make an iOS app to work alongside until Apple decides to participate in modern browser standards like everyone else.
You can use Mediadevices.getUserMedia (https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) to capture webcam stream on browser (chrome and firefox).
To play with webcam stream on safari, you would have to use a pollyfill - https://github.com/Temasys/AdapterJS
To record the video/audio stream, you can make use of Media recorder api https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder (Note : recording stream is still a challenge in Safari as there is no support/pollyfill. However, it works perfectly on Chrome and Firefox latest versions).
Helpful demonstrations :
https://webrtc.github.io/samples/
https://mozdevs.github.io/MediaRecorder-examples/index.html
https://codepen.io/collection/XjkNbN/
https://hacks.mozilla.org/2016/04/record-almost-everything-in-the-browser-with-mediarecorder/
I'm working on an html application that uses getUserMedia. It works great so far but there is one little problem:
The web application is also being called from local file system. That means file://.
Ok, WebRTC is unavailable in this case. When the Browser tries to call
navigator.getUserMedia({video: true, audio: false}, function(localMediaStream) {...}, function(error) {alert("blabla webrtc unavailable";)});
it should run into an error and call the error callback.
In case of file://, none of these two callbacks will be ever called.
In another case, the web application is running over regular http://, a warning is given, that the WebRTC feature is unavailable in insecure environments, but here the error callback is working as expected.
I need the error callback to tell the user, that WebRTC is unavailable.
What is wrong here?
(It is used for an unimportant feature. And only getUserMedia() is used, not the entire WebRTC-Workflow. But it is ugly, if it run into a blank screen)
And no, there is no waiting popup which ask the user for permission :-)
The problem is Chrome only. Probably a Browser bug?
Thanks.
Silently failing for file:// is documented Chrome behaviour, see here. If you can control Chrome, the allow-file-access-from-files flag enables getUserMedia from file urls.
My WebRTC app works fine when I connect two of the same browsers, but when I try a combination neither respond to each others signaling messages. Something probably worth mentioning is that I have not implemented TURN, however I don't see why that should make a difference so I'm not going to change that unless I'm fairly certain it will.
I don't have much of a clue where the error lies, so I will just add code on request for the sake of readability.
Make sure you enable DTLS-SRTP (Firefox only supports DTLS-SRTP) by passing the following to the PeerConnection constructor:
{ 'optional': [{'DtlsSrtpKeyAgreement': 'true'}]}
See this page for more details.
You have not really described what goes wrong with the signaling. No error messages and so on.
But based on the fact that you only see the fault when using two different web browsers I would recommend using Adapter.js that have been somewhat promoted from webRTC.
Link to webRTC demo that shows on the interoperability using Adapter.js(page also contains a link to Adapter.js):http://www.webrtc.org/demo
Direct link to
adapter.js
Try to turn off your firewalls to check if it fixes the problem.
In my case (Windown 7), default windows firewall didn't allow UDP for Private Inbound Connection Setting and Firefox + Chrome p2p connection just didn't work.
Hope it helps.