jywarren / spectral-workbench

Web-based tools for collecting, analyzing, and sharing data from a DIY spectrometer
http://spectralworkbench.org
GNU General Public License v3.0
95 stars 12 forks source link

completely web-based spectrometer client with getUserMedia (HTML5) #66

Closed jywarren closed 12 years ago

jywarren commented 12 years ago

https://github.com/addyosmani/getUserMedia.js

(enable experimental MediaStream compatibility in chrome://flags/)

jywarren commented 12 years ago

http://www.xarg.org/project/jquery-webcam-plugin/ - demo code for flash fallback video capture

onSave: function(data) {

var col = data.split(";");
var img = image;

for(var i = 0; i < 320; i++) {
    var tmp = parseInt(col[i]);
    img.data[pos + 0] = (tmp >> 16) & 0xff;
    img.data[pos + 1] = (tmp >> 8) & 0xff;
    img.data[pos + 2] = tmp & 0xff;
    img.data[pos + 3] = 0xff;
    pos+= 4;
}

if (pos >= 4 * 320 * 240) {
    ctx.putImageData(img, 0, 0);
    pos = 0;
}
}
jywarren commented 12 years ago

running, need to debug flash shim

jywarren commented 12 years ago

basically together now, for Chrome anyways; could use some mac/windows testing, and then fixing the flash fallback! Leaving this for more specific issues.