Include
<script src='https://www.totmob.com/nearbytes/plugin/js-fl/NearBytes.js' type='text/javascript' charset='utf-8'></script>
Initialization
NearBytes.init( appid, appkey, onload );
or
NearBytes.init( onload );
A new set, NearBytesEvents who allow to catch onplaystart and onplayend events
var mEvent = { onPlayStart:function(){}, onPlayEnd:function(){} };
NearBytes.setNearBytesEvents( mEvent );
To 'send' function use the signal of version 1.x
Example code:
NearBytes.debugMode( );
NearBytes.init( function( ){
var mListener = {
onReceiveData:function( d ) {},
onReceiveError:function( code, msg ) {},
};
NearBytes.setNearBytesListener( mListener );
NearBytes.startListening( );
} );