Ultrasound(removed after v1.1)

Constructor

optObject | nullThe config of Ultrasound
var ultrasound = new Jsonic.Ultrasound();

Property

AudioContextObjectThe contect of the track
CoderObjectThe Object for acoustic coding

Method

.createSender()

create an instance of SonicSender

var sender = ultrasound.createSender();

.createAccepter()

create an instance of SonicAccepter

var accepter = ultrasound.createAccepter();

SonicSender

Method

.send()

msgstringThe message to send.(By default, only 0-9 can be sent.)
callbackFunction | nullcallback function

Send a message by ultrasound

sender.send('123');

SonicAccepter

Method

.start()

start to listen to the sonic

accepter.start();

.stop()

stop listening to the sonic

accepter.stop();

.bind()

bind event

msgstringmessage
funcFunction | nullevent
accepter.bind('123',event);

.unbind()

unbind event

msgstringmessage
funcFunction | nullevent
accepter.unbind('123',event);

.one()

bind an event which will be fired only once

msgstringmessage
funcFunction | nullevent
accepter.one('123',event);