# GazeClient A javascript library to subscribe to local gaze data streams in the OTH/UR Eyetracking Classroom. ## Usage Add the library: ``` ``` Connect to a running *GazeServer*: ``` var gclient = new GazeClient(); gclient.connect("ws://localhost:8001/gaze"); ``` Subscribe to gaze events: ``` gclient.addEventListener("gazeDataAvailable", onGazeDataAvailable); function onGazeDataAvailable(event) { console.log(event); } ``` ## Build **Prerequisite** - node.js To build a current version of this library run `npm install` and `npm run build`. The client library is packed with [rollup](https://rollupjs.org/guide/en/) and copied to `build/` and `demo/`.