improfit-tracker
v0.0.4
Published
Improfit-Tracker is Improfit's Reactjs component that captures the video from the user webcam, does the pose inference and analyses the user performance while doing fitness exercises or augmented reality games.
Downloads
3
Readme
Improfit-Tracker react component
Improfit-Tracker is Improfit's Reactjs component that captures the video from the user webcam, does the pose inference and analyses the user performance while doing fitness exercises or augmented reality games.
Install
npm install improfit-tracker
How to use it
Import the component:
import AITracker from "improfit-tracker";
To start the exercise, just add this react component into your page.
<AITracker
# types available: pushups, burpee, crossleg, elbowknee, handankle, jumpingjacks, kneeup, lateral_lunge, lunges, raisearms, raiseleg, squats, sumosquat
# time: time in seconds
# repetitions: number of repetitions
exercise={{type: "pushups", time: 60, repetitions: 50}}
# Callback end of exercise hadleFinished(result<Object>)
# count: number of repetitions
# time: time used to perform the repetitions
onFinished={handleFinished}
# Callback when video is ready after end of exercise
# handleVideoReady(videoResult<MediaSourceObject>)
onVideoReady={handleVideoReady}
# Callback when user cancels exercise by clicking the top-right close icon
onForceClose={handleForceClose}
# optional
metadata={{
identityPoolId: "",
userId: "",
challengeId: "",
}}
# URL of the tracker
config={{
trackerURL: ""
}}
/>