Hacker News new | ask | show | jobs
by paulirish 3579 days ago
Web Audio API is all about playback. The media capture API can tackle recording, and it works on mobile: http://simpl.info/mediacapture/
1 comments

I thought that only works for video? Wouldn't you want navigator.getUserMedia for audio only?
Right, and on iOS, it just leaves the browser and opens the video recording app.

Unless something has changed, getUserMedia still doesn't work on Chrome/Android or iOS/Safari yet.

I believe you're correct - the state of audio recording on the web via browser is still awful. We are just finishing an investigation at work on my team, and find that we cannot avoid the use of Flash to record for IE/Edge/Safari...our only saving grace is that this app is mainly intended for desktop use.

I wish mobile browser vendors didn't avoid this problem - I get that they're all prioriizing different things, but the state of audio/video recording & playback is abysmal.

Have you checked SoundCloud's implementation?

https://developers.soundcloud.com/docs/api/sdks#recording https://github.com/soundcloud/soundcloud-javascript

I'm not sure if they solve the problem you face but I know they support Audio recording via their Javascript SDK and I thought it might be useful to you.

The documentation cautions you to "make sure to check if the user's browser supports all of it (1, 2, 3) before you start recording." All of it being "getUserMedia, Web Workers and the Web Audio API."

Surprisingly, it DOES look like getUserMedia is supported by Android browser and Android Chrome now (with some weird namespace prefix/object).

http://caniuse.com/#feat=stream

Still doesn't work on anything iOS though (until Apple puts it in Safari).

So no dice for HTML5 on mobile still (I've been waiting since 2012 for some way to support in-browser web-based audio recording, sigh). :|