getusermedia

Change sample rate of AudioContext (getUserMedia)

早过忘川 提交于 2020-01-09 13:02:11
问题 Im trying to record a 48000Hz recording via getUserMedia. But without luck. The returned audio MediaStream returns 44100Hz. How can i set this to 48000Hz? Here are snippets of my code: var startUsermedia = this.startUsermedia; navigator.getUserMedia({ audio: true, //sampleRate: 48000 }, startUsermedia, function (e) { console.log('No live audio input: ' + e); }); The startUsermedia function: startUsermedia: function (stream) { var input = audio_context.createMediaStreamSource(stream); console

Record audio one at a time and stop to save in ReactJS

喜欢而已 提交于 2020-01-06 05:51:12
问题 I am using getUserMedia() API to record audio when mic is off I am calling startRecord method on it's click {this.props.events.map((event) => ( <div key={event.event_name}> <div> {this.state.micStates[event.event_name]? <span onClick={()=>this.stopRecord(event.event_name)}> <MicOn /> </span> :<span onClick={()=>this.startRecord(event.event_name)}><MicOff /> </span>} </div> <li style={{color:'pink',}}>{event.date_time}</li> </div> )) } Two methods: startRecord , StopRecord startRecord : It

GetUserMedia - facingMode not recognized despite adapter.js

半世苍凉 提交于 2020-01-05 09:24:39
问题 I want to get the video stream of my rear camera in an Ionic Application. For this, I use getUserMedia that work correctly for the front camera. When I change the facing mode to 'environment' I got this error : Unknown constraint named facingMode rejected ConstraintNotSatisfiedError In my Ionic application I have already installed the npm package "webrtc-adapter". Here is my code to get the stream from the rear camera : this.constraints = { audio: true, video: {mandatory: { facingMode:

GetUserMedia - facingMode not recognized despite adapter.js

余生颓废 提交于 2020-01-05 09:23:12
问题 I want to get the video stream of my rear camera in an Ionic Application. For this, I use getUserMedia that work correctly for the front camera. When I change the facing mode to 'environment' I got this error : Unknown constraint named facingMode rejected ConstraintNotSatisfiedError In my Ionic application I have already installed the npm package "webrtc-adapter". Here is my code to get the stream from the rear camera : this.constraints = { audio: true, video: {mandatory: { facingMode:

getUserMedia() without SSL for local storage

邮差的信 提交于 2020-01-05 04:15:31
问题 In my website I need to record audio from the microphone and then replay it. I do not need to send those files to the server, they can remain on the client. Currently I'm successfully using flash for that, but I would like to switch to html5 and getUserMedia(). I'm aware that I normally need SSL for using getUserMedia() (except from localhost use), but I'm wondering if there is some sort of exemption if I don't want the data to be uploaded (and thus there should be no security issues in using

How to enable camera and microphone in packaged application for Chrome OS or Chrome extension?

喜你入骨 提交于 2020-01-02 07:29:26
问题 I'm testing scenario where I call a hangouts web page in separate window but application doesn't have access to microphone and camera - buttons are red and message says that "Hangouts can't use the selected microphone/camera". I have included in permissions "audioCapture" and "videoCapture" . What has to be done to make it work? Edit: After allowing media app has access to camera and microphone - I can see that in settings of hangouts but picture and voice are not transmitted over the

Firefox 22 mozGetUserMedia using 'screen' as device source

柔情痞子 提交于 2020-01-01 09:33:05
问题 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+, which provides experimental support for screen capturing (using 'screen' as device source); the code (snippet) for making this happen is: // select any supported getUserMedia function navigator.getMedia = (navigator.getUserMedia || navigator

Chrome Extension - getUserMedia throws “NotAllowedError: Failed due to shutdown”

拥有回忆 提交于 2020-01-01 05:24:06
问题 I have a suite which records the user's webcam and mic. It works great on a webpage, but in a Chrome Extension the line: navigator.mediaDevices.getUserMedia({video: true, audio: true}) .then(this.record.bind(this)) .catch(VidRA.error); is throwing NotAllowedError: Failed due to shutdown I've searched and found almost nothing that might explain this. Has anyone else come across this or does anyone know what I can do about it? 回答1: Wow, this is a minefield. Firstly, it seems this is a bug

Capturing an image from a webcam

白昼怎懂夜的黑 提交于 2019-12-31 21:12:05
问题 I'm attempting to randomly capture an image from a webcam and then save it to my server, right now i'm using getUserMedia to stream the webcam to video element then I can capture an image to a canvas using a button but i'm not sure how to save that image from the canvas to my server. Another issue is getUserMedia only works in Chrome, Opera and Firefox, is there any alternative for IE? This is what i'm currently working with: <video id="video" width="640" height="480" autoplay></video>

Capturing an image from a webcam

删除回忆录丶 提交于 2019-12-31 21:10:11
问题 I'm attempting to randomly capture an image from a webcam and then save it to my server, right now i'm using getUserMedia to stream the webcam to video element then I can capture an image to a canvas using a button but i'm not sure how to save that image from the canvas to my server. Another issue is getUserMedia only works in Chrome, Opera and Firefox, is there any alternative for IE? This is what i'm currently working with: <video id="video" width="640" height="480" autoplay></video>