Javascript Client

Requirements:

  • Windows:
    • Internet Explorer 7.0 +;
    • Internet Explorer 8.0 +;
    • Firefox 3.0 +.
  • Mac:
    • MacĀ OS X version 10.4; or
    • MacĀ OS X version 10.5.
    • Safari 4.0; or
    • Safari 5.0.

Getting the JS library:

1,Making sure the server is running. Checkout SOD Server Documentation if anything is not clear

2,Creating a sod object by passing device information as parameter so that as so initialize device for sod to register to server. var sod = new SODDevice(deviceInfo) deviceInfo can be passed as a JSON dictionary the properties we can set are:

    • orientation -- Number
    • FOV -- Number
    • location -- Number
    • width -- Number
    • height -- Number
    • stationary --Bool

3,initilize serverURL(ie: 'http://localhost:3000'), socketURL(ie: serverURL+'/socket.io/socket.io.js') then initilize the SOD by sod.init(serverURL,socketURL,sod)

4,To add listeners (listeners can subscribe to a route on the server.)

code sample:

5,