As of iOS 12, MediaRecorder hasn't been yet implemented. MediaDevices however works, allowing to request access to the user' microphone.
I am trying to figure out if there is at least one way of recording audio straight from the browser. I suppose there must be at least one, otherwise what would be the point of granting access to the microphone?
However I can't seem to find a single working solution. Am I missing something?
To my knowledge, these two libs are currently the only working solutions for iOS 11.3:
https://github.com/ai/audio-recorder-polyfill
https://github.com/danielstorey/WebAudioTrack
Related
I am currently experimenting with the getDisplayMedia browser api: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
I am successfully able to create a MediaStream video that captures an application, but it fails at capturing the audio (say for example I'm capturing a VLC video Running, there will be no audio track ever in the MediaStream).
I have tested that with both Chrome (83+) anf Firefox on Linux Mint and Windows, and it seems to fail everytime.
Also, when I'm trying to record audio only in Chrome (firefox not tested), it throws
TypeError: Failed to execute 'getDisplayMedia' on 'MediaDevices': Audio only requests are not supported
I have read multiple dev threads, and it seems that it is not mandatory that the created MediaStream will contain audio, even though it is asked in the options.
So my questions are:
is the audio option just complete decoration ? Because it seems
pretty useless
is there another way to capture audio ? for example with the Web Audio API ? I couldn't find any resource on that. Keep in mind that I want
to capture system or window audio, not microphone.
Thanks for your answers
EDIT: Alright, I found that there's one possibility to capture audio: it has to be with Chrome, on Windows, and capture a screen (not an app). According to the doc, it should work with Edge too. I wonder if there are other means to capture the audio without some loopback device.
I was searching for some solution to record audio inside of the browser and send for a webservice. I have found some solutions, but they only work for Chrome or Firefox. So, I wanna know:
Is there someway to record audio in SAFARI?
PS: I don't wanna use the tag video
What you are looking for is the getUserMedia API from WebRTC to access the user's microphone without any plugins. You can check out what browsers currently support the webrtc functionalities here: http://iswebrtcreadyyet.com/
At the moment it is not ready for safari.
The best support for webrtc is given by google because they are pushing this standard a lot.
I'm trying to implement audio recording in a website. Basically the user should be able to press a button and speak something into the microphone. The recorded audio should then be sent to the server for further processing. I realise that you can do this with Flash, but for now I'm trying to avoid that.
I found several resources on the internet about it (i.e. link) but as it seems, this functionality is not widly supported yet. I experienced differences betweet the used browser and between the used operating system. For instance, the Chrome Browser doesn't seem to access any microphone on Linux correctly. So i was wondering if anyone knows a good resource to dive into this. Or maybe someone tried to set up something like this himself, and can help with some suggestions about where the limitations of HTML5 and the JavaScript Web Audio API are right now.
Thanks!
As of Chrome Version 27.0.1453.56 beta Mac, audio recording works with this demo application https://github.com/mattdiamond/Recorderjs
This app returns back a WAV file for the user which can be uploaded to the server.
If you want a truly robust solution that works on most desktop web browsers, you may need to resort to Flash.
This article covers up pretty well the current state of audio video capture possibilites using HTML5:
http://hdfvr.com/html5-video-recording
Also for just audio capture, here's a gitHub project that records audio to mp3 directly from the browser:
https://github.com/nusofthq/Recordmp3js
I've tried many different types of Javascript code, and I've changed my microphone settings in Windows and in Chrome's settings, and nothing has worked. I've tried enabling "Web Audio Input" in chrome://flags but nothing works, at all. Does anyone have any suggestions? Camera access works and I can easily do HTML5 camera manipulation but any microphone tasks don't work.
The following JSFiddle doesn't work on my browser: http://jsfiddle.net/BWYu9/3/
Give it a shot in the Canary build of Chrome. I think the ability to do this with an audio stream is pretty new - although for some reason I can't find a link to the Chromium issue.
You can try with Chrome Canary or perform the following steps:
open google.com
speak on microphone
if the answer is "cannot recognize speech it might be that your microphone is not recognized. (this will help to identify the source of the problem)
See the following link for this issue:
https://code.google.com/p/chromium/issues/detail?id=226327
I have found that many different problems can accrue with the microphone in the Google search window of chrome. The main problem I have found to be the most upsetting is after a Java up date I find it not working, but everything appears to be working fine with all my audio settings. My microphone levels are good in sound properties a for Google voice and video chat. but in the search bar of Google chrome the thing is still not working to solve the problem I discovered that resetting my Integrated Microphone Array to default had been canceled and after resitting it again to default this go the microphone to work.
I'm on a new project that requires to stream audio files (mp3) and record voice messages.. of course my first option was to use flash. But the problem is that the customer wants the website to be iPhone friendly.
Is there any technologie that allows me to play and record voice messages just with javascript/php/xhtml?
And of course, the website should be fully compatible with firefox, safari, internet explorer, etc.
I googled it and everything I found was flash-based.
but if you have any clue about it, please let me know.
No. Not even the new-ish HTML5 has any features to record audio. You'd need to go through Flash or Java - but that would rule out iPhone.
if you want to record sound you should do it with the new HTML5's api's, you can read more about it on
https://labs.ericsson.com/developer-community/blog/beyond-html5-audio-capture-web-browsers
However, this is theory, in reality no browsers support it and there is no way to do it. So in short: you cannot do what you ask.
What you could do is create an iPhone native app for those who want to use iPhone, and a flash website for those who want to access it with a regular browser.