Code Monkey home page Code Monkey logo

lookatme's Introduction

LookAtMe

API LookAtMe AwesomeAndroid Download

Android library for a VideoView that plays video only when ๐Ÿ‘€ are open and ๐Ÿ‘ฆ is detected.

GIF

Screenshots

screenshot_2019-01-10-07-02-17-959_com pd trackeye screenshot_2019-01-10-07-02-22-894_com pd trackeye

Prerequisites

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
		repositories {
			...
			maven { url 'https://www.jitpack.io' }
		}
	}

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	        implementation 'com.github.Pradyuman7:LookAtMe:Version1.0'
}

Usage

LookAtMe is very easy to use and can be directly used in your application. You just need to first declare the LookAtMe variable in your activity, and add the following in layout of your activity (XML file).

        private LookAtMe lookAtMe;
        lookAtMe = findViewById(R.id.lookme);
<com.pd.lookatme.LookAtMe
        android:id="@+id/lookme"
        android:layout_width="match_parent"
        android:layout_height="250dp" />

After this, just initiallise LookAtMe variable with the activity context, add the video URI, start the video and just call setLookMe(), the whole code would look something like this:

        lookAtMe.init(this);
        lookAtMe.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.videoplayback));

        lookAtMe.start();
        lookAtMe.setLookMe();

You can also personalise the experience according to your need, using init(). In this method you can add if you want the eye-tracking mode to be FAST or ACCURATE, and also which camera to use, front or back. The method bodies look like this:

public void init(Context activityContext, String mode, String cameraFace){
        // add mode to be fast or accurate and cameraFace to be front or back
    }
public void init(Context activityContext, String mode){
        // add mode to be accurate or fast   
    }

Pull Request

Have some new ideas or found a bug? Do not hesitate to open an issue and make a pull request.

License

LookAtME is under License: Apache. See the LICENSE file for more info.

Credits

The video being played in the android app is owned solely by Pixar animations and the author lays no claim over the video.

lookatme's People

Contributors

pradyuman7 avatar

Watchers

James Cloos 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.