Questions tagged [getusermedia]

Access to media data streams--webcam video, microphone audio--from browser Javascript. Abbreviated gUM

getUserMedia provides access to data streams from media devices such as webcams and microphones. It is used from Javascript running in a user's web browser. It supports the development of front-end web application code for capturing media.

Support varies from browser to browser and device to device. See CanIUse.com for up-to-date information.

getUserMedia forms part of browser-resident WebRTC support (see ). It can be used by itself without establishing WebRTC connections.

getUserMedia is often abbreviated gUM. It's often used in conjunction with MediaRecorder; see .

Further references:

See also:

1098 questions
5
votes
1 answer

Instruct getUserMedia to use best available camera resolution

I am using the getUserMedia function to record video from a webcam. Everyting works fine, except that it was only recording in 640x480 resolution, when I just specified video: true for the constraint. If I set the constraint as below, I now get…
Saqib
  • 7,242
  • 7
  • 41
  • 55
5
votes
4 answers

WebRTC getUserMedia promise api support in Chrome

Does chrome support promise based APIs for WebRTC? I am not able to get the getUserMedia() promised based API working in Chrome. Mitel WebRTC client
sthustfo
  • 1,209
  • 4
  • 19
  • 35
5
votes
1 answer

getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

my confusion is that i had used the gerUSerMedia() in my page which is not working from our our server while in some of the machine had chrome with version of 48.0.2560.0 in those chrome browser it will give following warning : getUserMedia() no…
5
votes
1 answer

How to record audio from Audio Element using javascript

I am making an audio recorder using HTML5 and Javascript and do not want to include any third party API, I reached at my first step by creating an audio retriever and player using
5
votes
3 answers

getusermedia freezes in mobile browsers

The JavaScript below captures still images from a webcam on a jQuery-mobile website. The code works perfectly on desktops, but on mobile phones (Android and iOS) the video plays then stops on the first frame! Code (sorry about the length): …
Zalaboza
  • 8,899
  • 16
  • 77
  • 142
5
votes
3 answers

Make video stream Optional in getUserMedia

In my application a user can make calls if he can produce an audio stream. So, I need to require access to the microphone (audio stream). Without it the application should throw an error. Video is optional. So, I call navigator.getUserMedia and put …
SET001
  • 11,480
  • 6
  • 52
  • 76
5
votes
2 answers

Desktop sharing Chrome extension throws NavigatorUserMediaError InvalidStateError

I'm writing a simple WebRTC Google Chrome extension for desktop sharing. I tried to use getusermedia, but every time the error callback function was called and this is the error returned: NavigatorUserMediaError {constraintName: "", …
5
votes
1 answer

Peer-to-Peer 1080p live streaming using WebRTC/Alternative?

I've been experimenting with WebRTC and its ability to stream video/audio using p2p, however I've found that it's not able to stream any resolutions > 720p. Using getUserMedia() I'm able to capture the local webcam in 1080p, but it seems to fail at…
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
5
votes
3 answers

Is there a way to choose codecs in WebRTC PeerConnection?

Hey I would like to know if there is any way to choose codecs when creating the offer/answer in WebRTC. There are currently not many video codecs to choose from, but there are audio codecs like Opus, PCMU, PCMA etc.
justGoscha
  • 24,085
  • 15
  • 50
  • 61
5
votes
3 answers

Is it possible now to use GetUserMedia API to read video stream from web camera and send it directly to server for further broadcasting?

I need to build a web application that uses WebRTC to get web camera video stream and mic audio stream and immediatelly translate it to the server for further broadcasting to multiple clients. The app must do it in real time in full duplex. I mean…
paperstreet7
  • 2,058
  • 1
  • 15
  • 18
5
votes
1 answer

WebRTC (getUserMedia) on CEF not working. But it works on Chrome. Any ideas?

I have a bare bones web video chat page that works on Chrome. Kind of like apprtc.appspot.com But I want to embed this functionality on c++/c# my application. So I tried Chromium Embedded Framework (in short, CEF, using cefclient.exe) and WebRTC…
4
votes
0 answers

HTML Video Element sometimes can't play stream from getUserMedia in PWA mode on iOS

I'm trying to capture the camera input and play it in a video element. This code always works on desktop Chrome and Safari. On iOS it always works while in browser mode using Safari. The problem I'm facing is it will only sometimes not work in…
4
votes
0 answers

using navigator.mediaDevices.getUserMedia shows Black screen in IOS App using wkwebview. works fine in IOS safari browser

I have an IOS webview app and a site that triggers a script navigator.mediaDevices.getUserMedia to reduce the quality of the image while taking picture instead of compressor. we are using this script to open up a camera and take an image. Its works…
4
votes
1 answer

Stream realtime audio over socket.io

How do i stream realtime audio from one client to possibly multiple clients with socket.io? I got to the point where i can record audio and playback the audio in the same tab. That's my current code for this: $(document).ready(function () { var…
MadLuca
  • 81
  • 1
  • 7
4
votes
1 answer

How to download a recording using getUsermedia and mediaRecorder and give the video specifications?

navigator.mediaDevices.getUserMedia().then(stream=>{ //a recorder is created var mediaRecorder = new MediaRecorder(stream); //started it mediaRecorder.start(); //an array is created that receives all the data var recordedChunks = []; //fill…