Recorderjs
Recorderjs copied to clipboard
callback function if user has allowed access to microphone in browser
i want to call a custom function, when user allowed access to microphone from browser alert . how can we do that. i need to do that in my custom js . please help me.
function myFunction () {
... some code
}
navigator.getUserMedia({audio:true,video:false}, ( myFunction, console.log "You must run this on https, or localhost for it to work")
Be careful, this is a callback on an asynchronous function, so the value of your 'this' is not going to be the same as its executing context. Use JS bind if you need access to the original context.