javascript - Ionic 2 Web Audio Api -


i'm building ionic 2 application uses users microphone. on web use following access microphone.

navigator.getusermedia = (navigator['getusermedia'] ||     navigator['webkitgetusermedia'] || navigator['mozgetusermedia'] ||     navigator['msgetusermedia']);  (<any>navigator.mediadevices.getusermedia({audio:true}).then((stream)=>{........... 

when ionic serve application, audio input recorded , works. however, when run app on real android device, nothing happens when make sound. how can access users microphone in ionic 2 application?

try usin cordova plugin access device microphone,check here


Comments

Popular posts from this blog

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -