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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.0
    2
  • 2.0.1
    1
  • 2.0.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i mic-selector

Weekly Downloads

5

Version

2.1.0

License

MIT

Last publish

Collaborators

  • data-doge