getusermedia

Converting WAV to any compressed audio format in client-side JavaScript

孤街醉人 提交于 2019-11-28 16:13:41
I am recording audio from getUserMedia({audio:true}); in the browser using Recorder.js and then exporting it as a WAV file because that's the only option the library provides. A 1 minute 20 seconds file is 14.1 MB large. I need to upload the audio to a server and I need to do it fast. How do I convert the WAV audio in any other compressed format to lower the file size? I don't mind converting to: MP3 Opus WebM Ogg FLAC any other format you know of If there is no way as of now to convert to any of these formats, how can I compress the WAV file on the client? PS: I did a lot of searches to find

switch camera using MediaDevices.getUserMedia() in webrtc

烂漫一生 提交于 2019-11-28 13:38:16
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 front=false; var myConstraints = { video: { facingMode: (front? "user" : "environment")} }; navigator.mediaDevices.getUserMedia(myConstraints).then(function(stream) { } any idea about this?? jib Phone hardware typically doesn't allow opening both the front and back camera at the same time. Change your code to stop() the existing stream before getting the

Disabling Auto Gain Conctrol with WebRTC App

﹥>﹥吖頭↗ 提交于 2019-11-28 10:21:57
is there a way to disable the WebRTC "auto gain control feature" by default, by applying some javascript code to the app files? i am using simplewebrtc. You can turn off audio processing using constraints (use https fiddle for Chrome): var constraints = { audio: { echoCancellation: false, noiseSuppression: false, autoGainControl: false, } }; navigator.mediaDevices.getUserMedia(constraints) .then(stream => audio.srcObject = stream) .catch(e => log(e)); var log = msg => div.innerHTML += msg + "<br>"; <audio id="audio" controls autoplay></audio><br> <div id="div"></div> <script src="https:/

iOS 11 getUserMedia not working?

折月煮酒 提交于 2019-11-28 07:00:53
Apple released a statement that getUserMedia will be fully functional on iOS 11. After installing iOS 11 Beta version 5, I do get a message that my website requests access to my camera and microphone, but it seems that the line: video.src = window.URL.createObjectURL(stream); or: video.srcObject = stream; Does not work. No errors, no exceptions, simply no picture from the phone's camera. Here's my full script: $(function () { video = document.getElementById('vid'); navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; navigator

Progressive Web App: Error Accessing navigator.mediaDevices.getUserMedia?

99封情书 提交于 2019-11-28 06:32:20
问题 My app accesses the camera for purposes of webrtc, and works correctly. I'm using pwacompat from Google Labs to add pwa features to my web app. When running the app as a pwa , everything works fine until I access the camera. Then I get this console.log error: getUserMedia failedObject {type: "error", msg: "undefined is not an object (evaluating 'navigat…"} getUserMedia failed type: error msg: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia') What am I missing? 回答1:

HTML5 & getUserMedia - Record Audio & Save to Web Server after Certain Time

妖精的绣舞 提交于 2019-11-28 06:06:50
I'm having some difficulties with getUserMedia with HTML5 whilst developing my web page. This is the first time I've tried to implement this to record a users audio input. Flash is not an option for this project as it has to be used on mobile devices too. I come here to see if anyone has experience with and knows how to implement an HTML5 with getUserMedia to record a users microphone for a certain amount of time (done with a session in PHP) and then saves and sends the audio file to a web server. If this isn't possible then is there any other way, perhaps with a Java applet? The js: <script>

HTML5 Microphone capture stops after 5 seconds in Firefox

耗尽温柔 提交于 2019-11-28 02:37:42
问题 I'm capturing audio input from microphone with getUserMedia() function, works fine in chrome, but in firefox sound dies out after 5 seconds. If I send request for microphone again (without reloading the page) same thing happens. Here is the code (I used http://updates.html5rocks.com/2012/09/Live-Web-Audio-Input-Enabled as guidance): //getting the function depending on browser navigator.getMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia ||

reprompt for permissions with getUserMedia() after initial denial

泄露秘密 提交于 2019-11-27 18:27:26
How do we go about requesting camera/microphone access with getUserMedia() after being denied once? I'm working with getUserMedia to access the user's camera and pipe the data to a canvas. That bit all works fine. In testing, I hit deny once. At this point in Chrome and Firefox, any subsequent requests with getUserMedia() default to the denied state. We obviously don't want to annoy the hell out of our users by requesting permissions for camera/microphone on every page load after being denied. That's already annoying enough with the geolocation api. However, there has to be a way to request it

NotReadableError: Failed to allocate videosource

混江龙づ霸主 提交于 2019-11-27 15:44:29
问题 I get this error in Firefox 51 when I try to execute the following code and when I select my laptop's camera: navigator.getMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mediaDevices.getUserMedia || navigator.msGetUserMedia); navigator.getMedia({ video: true, audio: false }, function(stream) { if (navigator.mozGetUserMedia) { video.mozSrcObject = stream; } else { var vendorURL = window.URL || window.webkitURL; video.src = vendorURL.createObjectURL(stream); }

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

こ雲淡風輕ζ 提交于 2019-11-27 15:18:10
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 store on our server. I moved from flash, because flash, to a WebRTC implementation with a Kurento media server. This works super well with high quality internet connections but is relatively lacking for users with poor connectivity. I was thinking if I could some how implement a bit of a buffer before feeding the server so that I can make up for dips in