gazejs

An implementation of the JavaScript bindings for Tobii Gaze SDK

GazeJS

Utilizing BridJS api to implement JavaScript bindings for Tobii Gaze SDK

npm install gazejs

Download lastest Tobii Gaze SDK and copy "TobiiGazeCore64.dll" to working directory

var gazejs = require("gazejs")
var eyeTracker = gazejs.createEyeTracker(gazejs.TOBII_GAZE_SDK);
var listener = {
    onStart:function(){
        console.log("OnStart");
    },
    onStop:function(){
        console.log("OnStop");
    },
    onError:function(error){
        console.log(error);
    },
    onGazeData:function(gazeData){
        console.log(gazeData);
    }
};
 
eyeTracker.init();
eyeTracker.setListener(listener);
 
log.info("Library version: "+eyeTracker.getLibraryVersion());
log.info("Model name: "+eyeTracker.getModelName());
 
eyeTracker.start();
 
/*Stop eye tracking after 20 seconds*/
setTimeout(function(){
    eyeTracker.release();
},20000);