Band
Constructor
var band = new Jsonic.Band();
Property
AudioContext | Object | The context. |
Analyser | Object | Analyser node of current node. |
ChannelPairs | Object | The array to store instances of Jsonic.ChannelPair |
Interval | Number | The interval to send data |
onMsg | Function | Fired when band received message. |
onStartReceive | Function | Fired when band start to receive message. |
Method
.initDefaultChannel()
To add defaut channelpairs.
band.initDefaultChannel();
.addChannelPair()
Add ChannelPairs to band
band.addChannelPair(instance1,instance2,...);
.send()
stop rendering canvases
data | String | data to be sent |
callback | Function || Null | The interval to send data |
band.send('Hello Jsonic');
.listenSource()
listen to a input
navigator.webkitGetUserMedia({
audio:{optional:[{echoCancellation:false}]}
},function(stream){
_input = band.AudioContext.createMediaStreamSource(stream);
band.listenSource(_input);
},function(e){});
.scanEnvironment()
start to listen to the environment
band.scanEnvironment();