WeibelLab / ChronoSense

ChronoSense: a multimodal data capture software for all. OS agnostic, time aware, extensible. Powered by Node.js and Electron.
http://chronosense.ucsd.edu/
GNU General Public License v3.0
3 stars 0 forks source link

Generic media device to cut down on repeat code #54

Open stevenrick opened 2 years ago

stevenrick commented 2 years ago

Now that we have camera.js, audio.js, and screen_capture_device.js it would be smart to genericize the code and logic they all share and move it to a single extendable class object. This would cut down on complexity, improve readability, and streamline bugfixes and future enhancement.

Behavior like constraint handling, recorder calls, and creating some common UI elements can likely be shared.

Each class can then implement custom behavior (audio.js recording to .wav file, camera.js and screen_capture_device rendering to canvas, etc)