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
3 answers

How to concat chunks of incoming binary into video (webm) file node js?

I am trying to upload chunks of base64 to node js server and save those chunks into one file let chunks = []; app.post('/api', (req, res) => { let {blob} = req.body; //converting chunks of base64 to buffer chunks.push(Buffer.from(blob,…
Nane
  • 2,370
  • 6
  • 34
  • 74
5
votes
0 answers

How can I prevent breakup/choppiness/glitches when using an AudioWorklet to stream captured audio?

We've been working on a JavaScript-based audio chat client that runs in the browser and sends audio samples to a server via a WebSocket. We previously tried using the Web Audio API's ScriptProcessorNode to obtain the sample values. This worked well…
5
votes
6 answers

getUserMedia working on website but not working on mobile

I am using getusermedia to record audio in my website. I've included the javascript of getusermedia. The record function works fine on website but doesn't even popup for permission in when opened on mobile. var constraints = { audio: true, …
shubham kakade
  • 290
  • 5
  • 10
5
votes
1 answer

How to maintain a landscape aspect ratio with getUserMedia on mobile devices?

I'm using getUserMedia with the following constraints: var constraints = { audio: true, video: { width: 960, height: 540, } }; navigator.mediaDevices.getUserMedia(constraints).then(...); This works when using desktops…
Koby Douek
  • 16,156
  • 19
  • 74
  • 103
5
votes
1 answer

Send video/audio over socket.io from browser

I am trying to send video and audio trought socket.io but I geting Buffer on the end how should I handle it? Here is my code: SERVER, HERE I RECIVE BUFFER: io.on('connection', function (socket) { socket.on('radio', function (image) { …
5
votes
1 answer

Html5 separating audio stream from video stream

Using userMedia I get a stream that contains both video and audio. Is there a way to separate them? Ie out of the one stream get 2 streams one that has only video and the other has only audio?
Ronen Rabinovici
  • 8,680
  • 5
  • 34
  • 46
5
votes
2 answers

iOS11 getUserMedia with apple web-app not working

Edit: Duplicate of How to access camera on iOS11 home screen web app? I'm running into a problem with using a apple web-app together with camera access through the getUserMedia API. I have some application that is working fine when accessed through…
Evertvdw
  • 827
  • 10
  • 17
5
votes
1 answer

How to change dimensions with getUserMedia on iOS?

Since Apple's iOS 11 webRTC and getUserMedia introduction, I'm able to get the camera's input to the
Koby Douek
  • 16,156
  • 19
  • 74
  • 103
5
votes
1 answer

How to check with JavaScript that webcam is being used in Chrome

If webcam is being used in Chrome, there will be a red dot on the tab for that page. And if other pages try to access webcam will get black for video. My question is, is it able to check with JavaScript that webcam is being used? How? By using…
r ne
  • 621
  • 7
  • 19
5
votes
1 answer

Callback event for getUserMedia()

I'm trying to take a snapshot from my webcam with the navigator.mediaDevices.getUserMedia() and canvas.getContext('2d').drawImage() functions. When I do it like this, it works perfectly: function init(){ myVideo =…
xcess
  • 53
  • 1
  • 4
5
votes
0 answers

facingMode in MediaDevices.getUserMedia seems not work in latest Android Chrome?(v53)

I have a function which can let user select the camera and show the captured video on the page [like this]. My code works before Android Google Chrome version 52, but don't know why it is broken now. First, I check which devices I can…
Hui-Yu Lee
  • 909
  • 8
  • 20
5
votes
1 answer

navigator.getUserMedia one constraint allowed, another one not, success callback called upon closing browser prompt

Here is my code. captureUserMedia(mediaConstraints, successCallback, errorCallback) { navigator.getUserMedia(mediaConstraints, successCallback, errorCallback); } captureUserMedia00(callback){ captureUserMedia({ audio: true, video:…
5
votes
1 answer

How to generate negative audio waves from input sound in javascript?

I found a javascript that captures the current microphone input just to send it out again. You can see it here: https://codepen.io/MyXoToD/pen/bdb1b834b15aaa4b4fcc8c7b50c23a6f?editors=1010 (only works with https). I was wondering how I can generate…
MyXoToD
  • 620
  • 5
  • 13
5
votes
1 answer

WebRTC: How to calculate user bandwidth/network latency of RTC Peer Connection

So, I'm working on an App that utilises WebRTC to provide video/audio communication between peers. I'd like to provide some feedback to users in regard to their network connection/bandwidth/latency etc in order to suggest possible solutions if…
An0nC0d3r
  • 1,275
  • 13
  • 33
5
votes
1 answer

Can I use some sort of local storage as a temporary holding place for getUserMedia for near-RTC?

I have a use case that doesn't exactly require real time communication, but as close as I can get it to make sure my users don't have to wait forever uploading a file after the fact. Our site allows users to record video and audio that we then…
Ron
  • 181
  • 3
  • 12