export default < WAGenNode > { getDefaultNode ( ) { return { "kind" : "input" , "type" : "microphone" , "options" : { } } ; } , initWANode ( audioCtx , node ) { return navigator . mediaDevices . getUserMedia ( { audio : true } ) . then ( function ( stream ) { return audioCtx . createMediaStreamSource ( stream ) ; } ) ; } , updateWANode ( waNode , node ) { } , generateCode ( nodeName , node ) { return `
const ${ nodeName } = audioCtx.createMediaStreamSource(
    await navigator.mediaDevices.getUserMedia({ audio: true })
);
` ; } } ;