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
17
votes
2 answers

How can I get the size of the webcam image with getUserMedia?

I'm trying to find out what will be the size of the image I get from the webcam using getUserMedia. Right now, in my Macbook, I have supposedly a 720p camera, but the image I'm getting is 640x480. I'm assuming this won't always be the case, though,…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
16
votes
1 answer

TypeError: Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL

I've been using getUserMedia to access camera from the browser. I tried it on several browsers and it works except on firefox. It works on chrome,avast,opera mini. This is my code:
trumanblack1025
  • 471
  • 2
  • 8
  • 19
16
votes
2 answers

Stop / kill WebRTC media stream

How to completely kill the WebRTC media stream? MediaStream.stop() is not working anymore. Testing in Chrome 47, Mac OS 10.11.
igorpavlov
  • 3,576
  • 6
  • 29
  • 56
16
votes
3 answers

Microphone activity level of WebRTC MediaStream

I would like some advice on how best to get the microphone activity level of an audio MediaStreamTrack javascript object in Chrome/Canary. The MediaStreamTrack object is an audio track of the MediaStream returned by getUserMedia, as part of the…
user1710407
  • 491
  • 1
  • 5
  • 16
16
votes
4 answers

Capture high resolution video/image html5

I use geUserMedia() to capture image from webcam Intro. Best resolution that I get is 640 X 480, but I have HD webcam that records video with 1280 X 720, takes a picture 2592 X 1944. How can I capture High Resolution photos? Here is one sample of…
Konstantin
  • 228
  • 1
  • 2
  • 6
15
votes
1 answer

Check if browser/platform support screen capturing via `getDisplayMedia`

We can request a media stream to a screen or windows via navigator.mediaDevices.getDisplayMedia(). However, this immediately prompts the user to decide which kind of capturing to use. I need to check if the browser/platform even support screen…
Lukas Kalbertodt
  • 79,749
  • 26
  • 255
  • 305
15
votes
1 answer

getUserMedia() in JavaScript normalizes across browsers. Illegal Invocation

When I try to do the following: var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; // now I try to invoke it with some parameters: getUserMedia(...) // not working! It throws an error "Illegal…
user3599803
  • 6,435
  • 17
  • 69
  • 130
15
votes
4 answers

How can I use Opus Codec from JavaScript

I would like to see if it's possible to have direct access to Opus using getUserMedia or anything similar from the latest browsers. I've been researching on it a lot but with no Good results. I'm aware that either Opus or Speex are actually used in…
Omar Al-Ithawi
  • 4,988
  • 5
  • 36
  • 47
15
votes
5 answers

getUserMedia - how to detect if the device actually has a camera

I'm playing with the html5/javascript getUserMedia api to write a js app that will use the device's camera if available. I'm using Modernizr to detect the capability (of the browser) like this: if (Modernizr.getusermedia) { And within the true…
Nathan Russell
  • 3,428
  • 5
  • 30
  • 51
14
votes
2 answers

Use WebRTC/GetUserMedia stream as input for FFMPEG

I'm recording my screen with gerUserMedia and get my video & audio stream. I'm then using WebRTC to send/receive this stream on another device. Is there any way I can then use this incoming webrtc stream as an input for ffmpeg by converting it…
ApplowPi
  • 324
  • 1
  • 3
  • 10
14
votes
1 answer

How to cancel getUserMedia indicator after recording

I'm using the recorder.js and getUserMedia to do some audio recording in the browser. When starting the recording, the user is given the "Allow this site to use your microphone" prompt, and once they click allow, Chrome adds an indicator onto the…
nickf
  • 537,072
  • 198
  • 649
  • 721
14
votes
1 answer

Encode audio from getUserMedia() to a .OGG in JavaScript

So I have this HTML5 project I'm working on, where I'm converting an iOS app to a web-based one. Accompanying part of the content creation of the app is an audio recording, which I'm trying to replicate in JavaScript without the use of plugins; so…
twchapman
  • 237
  • 2
  • 10
13
votes
1 answer

Tap screen to trigger autofocus with getUserMedia

The API with getUserMedia is very useful to have a video stream inside the browser/inside a HTML5 page, see for example https://www.html5rocks.com/en/tutorials/getusermedia/intro/ or https://simpl.info/getusermedia/sources/. From this API, how to…
Basj
  • 41,386
  • 99
  • 383
  • 673
13
votes
4 answers

React Native: Webview getUserMedia not working (onPermissionRequest override?)

I'm developing an application for iOS, Android and Windows with React Native in which I need to show a webpage through a WebView. That webpage accesses the camera of the device, so it uses MediaDevices.getUserMedia() Javascript function. It works…
Unapedra
  • 2,043
  • 4
  • 25
  • 42
13
votes
1 answer

How to identify front and back cameras with mediaDevices.enumerateDevices() on iOS 11 Safari

I'm using getUserMedia() to capture a camera stream on iOS 11's Safari. When I get the list of cameras using the MediaDevices API, the labels are blank. Is there a way to reliably determine which camera is pointed in which…
Luke Dennis
  • 14,212
  • 17
  • 56
  • 69
1 2
3
73 74