Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Eye-Tracking Classroom
/
gaze-client.js
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f1ae651e
authored
Aug 20, 2019
by
Alexander Bazo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update usage information in Readme
parent
a944faf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
Readme.md
+7
-9
No files found.
Readme.md
View file @
f1ae651e
...
...
@@ -4,27 +4,25 @@ A javascript library to subscribe to local gaze data streams in the OTH/UR Eyetr
## Usage
Add the library:
**Add the library:**
```
<script type="application/javascript" src="gazeclient.js"></script>
```
Connect to a running
*GazeServer*
:
**Create a client and subscribe to gaze events:**
```
var gclient = new GazeClient();
gclient.connect("ws://localhost:8001/gaze");
gclient.addEventListener("gazeDataAvailable", function onGazeDataAvailable(event) {
console.log(event);
});
```
Subscribe to gaze events:
**Connect to a running gaze data server:**
```
gclient.addEventListener("gazeDataAvailable", onGazeDataAvailable);
function onGazeDataAvailable(event) {
console.log(event);
}
gclient.connect("ws://localhost:8001/gaze");
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment