Skip to content

A basic starting point for motion-detection apps using WebRTC & Canvas, refactored out of the Magic Xylophone by @soundstep

Notifications You must be signed in to change notification settings

jnoring/js-motion-detection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS Motion Detection

This project tries to provide a basis for other motion-detection apps, by separating the framework and its consumption.

The app uses WebRTC, HTML5 Canvas and some math, and is refactored out of the Magic Xylophone by soundstep. You can learn more about the process fom Romuald himself on Adobe Developer Connection and his blog post.

Usage

Any child element you add inside <div id="hotSpots"></div> will automagically work as a hotSpot, which means it will fire motion events on itself with extra data upon motion detection.

You could control its appearance & position with CSS, and hook to the motion events with jQuery / plain JS.

Sample Usage & DEMO

  • See some examples in sample.js
  • Open up the demo here. Hit Allow, check the console.

License

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

About

A basic starting point for motion-detection apps using WebRTC & Canvas, refactored out of the Magic Xylophone by @soundstep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published