plugin/microphone.js
function Microphone (options) {
	var self = this;

	Block.apply(self, arguments);

	//get access to the microphone
	getUserMedia({video: false, audio: true}, function (err, stream) {
		if (err) {
			console.log('failed to get microphone');
			self.state = 'error';
		} else {
			self.node = self.app.context.createMediaStreamSource(stream);
			self.restart();
			self.state = 'ready';
		}
	});

	return self;
}
function Microphone (options) {
	var self = this;

	Block.apply(self, arguments);

	//get access to the microphone
	getUserMedia({video: false, audio: true}, function (err, stream) {
		if (err) {
			console.log('failed to get microphone');
			self.state = 'error';
		} else {
			self.node = self.app.context.createMediaStreamSource(stream);
			self.restart();
			self.state = 'ready';
		}
	});

	return self;
}
function Microphone ( options ) { var self = this ; Block . apply ( self , arguments ) ; //get access to the microphone getUserMedia ( { video : false , audio : true } , function ( err , stream ) { if ( err ) { console . log ( 'failed to get microphone' ) ; self . state = 'error' ; } else { self . node = self . app . context . createMediaStreamSource ( stream ) ; self . restart ( ) ; self . state = 'ready' ; } } ) ; return self ; }
Create microphone based on usermedia

@constructor
Create microphone based on usermedia