mic-selector

2.1.0 • Public • Published

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

Package Sidebar

Install

npm i mic-selector

Weekly Downloads

1

Version

2.1.0

License

MIT

Last publish

Collaborators

  • data-doge