Giter VIP home page Giter VIP logo

webcamswiper's Introduction

WebcamSwiper

An experiment using getUserMedia to watch for swipes left and right with a hand. This could be applied to many different uses. Flipping through pictures in an image carousel, moving to the next item in a list, flipping pages of a book or magazine, etc.

Demo

Blog Post

Usage

Two custom events are added to the body tag by the library. You need to bind callbacks to these events and initialize the library. If desired you can stop the library with the destroy method as well.

  1. Include the webcam-swiper-0.1.js with a script tag or the loader of your choice.

  2. Bind the swipe events however you choose. Example with jQuery:

$("body").bind("webcamSwipeLeft", yourLeftEventHandler); $("body").bind("webcamSwipeRight", yourRightEventHandler);

  1. Start the webcam access with a call to the global initializeWebcamSwiper function like this:

window.initializeWebcamSwiper();

  1. Now it is running! If you choose to stop it call

window.destroyWebcamSwiper();

webcamswiper's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.