8000 First example on trackingjs.com simply doesn’t work · Issue #392 · eduardolundgren/tracking.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
First example on trackingjs.com simply doesn’t work #392
Open
@cfcoderatcodefactory

Description

@cfcoderatcodefactory

Under the title/subheading «Step 2: Choose what you want to play with», this code is supposed to «request your camera and track magenta, cyan and yellow colors that appear in front of it.»

However, nothing happens when I load this page in Firefox or C 4F2A hrome.

Anyone?

Code:
<!doctype html>

<title>tracking.js - first tracking</title> <script src="../build/tracking-min.js"></script> <script> var colors = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);

colors.on('track', function(event) {
if (event.data.length === 0) {
// No colors were detected in this frame.
} else {
event.data.forEach(function(rect) {
console.log(rect.x, rect.y, rect.height, rect.width, rect.color);
});
}
});

tracking.track('#myVideo', colors);
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0