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

MediaRecorder Blob to file in an electron app

I have an electron app that has very simple desktop capturing functionality: const {desktopCapturer} = require('electron') const fs = require('fs'); var recorder; var chunks = []; var WINDOW_TITLE = "App Title"; function startRecording() { …
Andy Baird
  • 6,088
  • 4
  • 43
  • 63
7
votes
3 answers

switch camera using MediaDevices.getUserMedia() in webrtc

I am trying navigator.MediaDevices.getUserMedia() webrtc to switch the device camera during the call. This functionality is working fine on the desktop browser but on mozilla android it is not working. Here is my code that i am using . var…
john
  • 611
  • 1
  • 7
  • 33
7
votes
2 answers

how to get running mediaStream

I've created a webCam Stream with navigator.getUserMedia({ "video": true }, function(stream){ videoTag.src = window.URL.createObjectURL(stream); videoTag.play(); } Can I access the MediaStream object in stream in global scope?* (something…
Breaker222
  • 1,334
  • 1
  • 14
  • 23
7
votes
1 answer

TypeError: 'getUserMedia' called on an object that does not implement interface MediaDevices

I'm trying to implement a webcam into a website using a video tag. It works in Chrome, but FireFox and IE return errors in the console. Anyone have any ideas why? Thank you! Code: navigator.getMedia = navigator.getUserMedia || …
AlesSvetina
  • 403
  • 3
  • 6
  • 19
7
votes
1 answer

Capturing an image in HTML5 at full resolution

It is possible to capture an image in javascript using the MediaStream API. But in order to do so it is first necessary to instantiate a video object, then paint a frame into a canvas to get an image. But unfortunately many devices (e.g. phones)…
Michael
  • 9,060
  • 14
  • 61
  • 123
7
votes
1 answer

Calling getUserMedia with new constraints causes black screen (MediaStream.ended=true)

On my nexus4 (Android 4.4.4) I am trying to switch between 'user' facing camera and 'environment' facing camera. Accessing either one directly works. Switching between them bij making another call to navigator.getUserMedia() setting new constraints…
Timo
  • 930
  • 2
  • 10
  • 22
7
votes
4 answers

how to stop screen sharing using WebRTC?

I'm using getUserMedia to get access to screen sharing. When user clicks a stop button, I want to stop screen sharing. According to MediaStream API, the stop() function should be called to stop sharing. But when I do so, I find the Chrome bar…
Ovilia
  • 7,066
  • 12
  • 47
  • 70
7
votes
1 answer

Chrome: onaudioprocess stops getting called after a while

I'm using ScriptProcessorNode's onaudioprocess callback to process the microphone input. By connecting MediaStreamSourceNode to the ScriptProcessorNode, I can get the raw audio data within the onaudioprocess callback function. However, after about…
kuu
  • 815
  • 1
  • 7
  • 16
7
votes
2 answers

Custom grunt-modernizr with non-core detects

Since the day I discovered yeoman, I use it for all my front-end projects. It includes grunt-modernizr that - at least I think - download the library and compiles it on the fly when I call the build task grunt build But I have a small problem : by…
Flo Schild
  • 5,104
  • 4
  • 40
  • 55
7
votes
2 answers

Firefox 22 mozGetUserMedia using 'screen' as device source

There have been some buzz in the air for the WebRTC support in Firefox 22. This is for someone who's in the know about Firefox development: Are there any support in Firefox for desktop screen capture todate? The technology does exist for Chrome 26+,…
knight
  • 300
  • 2
  • 7
6
votes
1 answer

getUserMedia on iOS 14.4 with WKWebView still produces a NotAllowedError

I'm trying to use getUserMedia on iOS 14.4 with WKWebView within a Cordova app. I'm using the HelloWorld app from Cordova to reproduce this. I provided the NSCameraUsageDescription string. I'm using the sample code as provided on…
qpwr
  • 408
  • 3
  • 15
6
votes
2 answers

Is it possible to disable the cursor from being recorded with getDisplayMedia()

I am recording my browser window using MediaStream and MediaRecorder. But need to disable the mouse cursor from being recorded, so when I create my video track, i use the following code: stream['input'] = await…
Carl Miller
  • 113
  • 2
  • 13
6
votes
1 answer

Stream audio from client to server to client using WebSocket

I am trying to capture microphone audio from a client web browser, live stream the captured audio to a Node.js server using WebSocket and then again stream the audio back to a different web browser client. So far, at the client side, I opened a…
6
votes
1 answer

Sending a stream from the browser to a Node JS server

The general idea: I created a Node JS program that interacts with multiple APIs to recreate a home assistant (like Alexia or Siri). It interacts mainly with IBM Watson. My first goal was to setup Dialogflow so that I could have a real AI processing…
AirOne
  • 226
  • 1
  • 2
  • 14
6
votes
1 answer

How to check if the permission to access microphone has been rejected by the user in FireFox

Is there a way to find out if the user has rejected or allowed permission to the media devices (Eg: Microphone, Camera) in Firefox?. In Chrome, I can check that with navigator.permissions.query but this fails in Firefox with a…
Murali Nepalli
  • 1,588
  • 8
  • 17