How to choose input video device for webrtc?
On Chrome: chrome://settings/content/camera chrome://settings/content/microphone On Firefox: media.navigator.permission.disabled=false
On Chrome: chrome://settings/content/camera chrome://settings/content/microphone On Firefox: media.navigator.permission.disabled=false
This still appears to be an issue even in Chrome 73. The solution that saved me for now is to also connect the media stream to a muted HTML audio element. This seems to make the stream work and audio starts flowing into the WebAudio nodes. This would look something like: let a = new … Read more
You end a stream by closing all of its tracks: stream.getTracks().forEach(function(track) { track.stop(); })
Update: WebRTC Support is coming in iOS14.3 (Beta) 🎉 Learn more here: https://webkit.org/blog/11353/mediarecorder-api/ From iOS11+ : WebRTC is partially supported in WKWebView, and fully supported in the Safari App browser. Explained: WebRTC has three main JavaScript APIs: MediaStream (aka getUserMedia) RTCPeerConnection RTCDataChannel For apps running inside Safari App, iOS11+, all WebRTC APIs are supported. That … Read more
Solved it by using the following: $(function () { video = document.getElementById(‘vid’); video.style.width = document.width + ‘px’; video.style.height = document.height + ‘px’; video.setAttribute(‘autoplay’, ”); video.setAttribute(‘muted’, ”); video.setAttribute(‘playsinline’, ”); var constraints = { audio: false, video: { facingMode: ‘user’ } } navigator.mediaDevices.getUserMedia(constraints).then(function success(stream) { video.srcObject = stream; }); });
The right format (by now) is: offerOptions = {‘offerToReceiveAudio’:true,’offerToReceiveVideo’:true}; as this is the new spec format and is supported by both Chrome and Firefox. Take special care to note the lower-case ‘o’s, as this did change and threw more than a few people. Hopefully you got it working by now. Also note that these are … Read more
A mesh of 3 users means each user sets up two connections, one to each of the other two users. At each client’s end, these are two entirely different RTCPeerConnections, and you can’t reuse candidates between them, as each candidate contains port numbers allocated specifically for the media and the target it is to be … Read more
TURN it’s an extension of STUN, so TURN server has also STUN features. https://code.google.com/p/rfc5766-turn-server/ works also as a STUN, so you can try to write something like this: var pc_config = { “iceServers”: [{ “url”:”turn:my_username@<turn_server_ip_address>”, “credential”:”my_password” }] }; pc_new = new webkitRTCPeerConnection(pc_config);
I came along the same problem and stumbled upon these two gems: https://github.com/helloIAmPau/node-rtc Sadly it is lacking any documentation. However https://github.com/js-platform/node-webrtc seems more reliable to me.
You cannot upload the live stream itself while it is running. This is because it is a LIVE stream. So, this leaves you with a handful options. Record the audio stream using one of the many recorders out there RecordRTC works fairly well. Wait until the stream is completed and then upload the file. Send … Read more