2.1.0 • Published 8 years ago

mic-selector v2.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

mic-selector

returns a jQuery select element populated with option elements for all available microphone inputs. on change, the element triggers a 'bang' event with a MediaStreamAudioSourceNode for the chosen input.

install

npm i --save mic-selector

usage

var $ = require('jquery')
var audioCtx = new (window.AudioContext || window.webkitAudioContext)()
var $micSelector = require('mic-selector')(audioCtx)

$micSelector.on('bang', function (e, node) {
  node.connect(audioCtx.destination)
})

$('body').append($micSelector)

eyy