/ Video

A VideoView that plays video only when eyes are open and boy is detected

A VideoView that plays video only when eyes are open and boy is detected

LookAtMe

A VideoView that Detects your Face and Tracks your Eyes?

LookAtMe

LookAtMeZ

LookAtMe

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.

GitHub