Skip to content

GazeJS project hosts an implementation of the JavaScript bindings for Tobii Gaze SDK

License

Notifications You must be signed in to change notification settings

gerard-payne/GazeJS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GazeJS

Utilizing BridJS api to implement JavaScript bindings for Tobii Gaze SDK

###Video Demonstration EyeMining for Web ###Installation

npm install gazejs

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

var gazejs = require("gazejs")
var eyeTracker = gazejs.createEyeTracker(gazejs.TOBII_GAZE_SDK);//or gazejs.SR_EYELINK_SDK
var listener = {
    onConnect:function(){
        log.info("Library version: "+eyeTracker.getLibraryVersion());
        log.info("Model name: "+eyeTracker.getModelName());
        
        eyeTracker.start();
        console.log("OnConnect");
    },
    onStart:function(){
        console.log("OnStart");
    },
    onStop:function(){
        console.log("OnStop");
    },
    onError:function(error){
        console.log(error);
    },
    onGazeData:function(gazeData){
        console.log(gazeData);
    }
};

eyeTracker.setListener(listener);
eyeTracker.connect();

/*Stop eye tracking after 20 seconds*/
setTimeout(function(){
    eyeTracker.release();
},20000);

About

GazeJS project hosts an implementation of the JavaScript bindings for Tobii Gaze SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%