- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was testing the "Hands Viewer (Javascript)" code from the SDK Sample Browser and the example would not work, until I went into the code and changed the file:
hands_viewer.html (line 104)
from
if (data.hands == 'undefined') return;
to
if (data.hands === 'undefined') return;
Just thought I'd share, might help someone.
And if any Intel personnel is reading this, is there a code repository where we can maybe share code bugs/suggestions? If no, why not? :) Thanks :)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works under Chrome. Are you using IE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I am using the most recent chrome as my dev browser.
I stepped through the code, and thats where the issue was at.
I am going to set up a clean user environment for chrome, without any of my extensions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
the problem still exists in the latest versions of the SDK.
hands_viewer.html (line 104)
if (data.hands == 'undefined') return;
This doesn't work in Chrome nor Firefox.
Reason: your need to check the type via 'typeof'.
See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
Correct code:
if (typeof data.hands === 'undefined') return;
@IntelDevelopers: please update the SDK :-)
Thanks in advance
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a second issue in this example file.
From time to time, this error occurs: Uncaught TypeError: Cannot read property 'positionImage' of undefined
I've found the root cause and fixed it.
Please, see this github ghist revisions for the two fixes:
https://gist.github.com/nitram509/7d8869f30d76db97c683/revisions
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page