canvas.fm
canvas.fm copied to clipboard
Couple of build issues.
Hey dude,
Just deployed this and noticed a couple of things. I'm not sure if you are still supporting this repo, but if you need any contribution, I'd be happy to help!
1: Node.js is at v0.6.18 however, express 2.x is not compatible with anything over 0.5. This throws up a 'module not found' error (which was mentioned in the other discussion). The way I found to fix it was to specify that express be version 3alpha. 'npm install express@3' - Might help someone!
2: When you first run 'node app.js', it is looking for a config.json file in the root folder. My experience with Node is limited so this might be correct, however it wasn't present in your repo and I had to delve into the files to work out what values that file needed to hold.
3: There's no database schema provided so I had to go through the code again to work out what tables I needed.
4: Im running Ubuntu Hardy and with ffmpeg installed, it's default naming convention for the resampler codec is 'vorbis' not 'libvorbis'. (not sure if this is a Ubuntu specific thing)
I've got everything working but the xhr put request so far so I may have to come back to this :) Hope that helps and as I say, if you need any help maintaining this, let me know.
There are basically no install steps for this app, mostly because I didn't imagine anyone else would be installing it locally etc.
1 - I just checked on the server and it is actually running on node 0.4.x, however I seem to be running it locally fine with 0.6.x. In issue 2 the suggestion is to use express version 2.5.9. However if you are running it without issue on a more recent version of node and express that is probably preferable.
2 - Yes, config.json basically just contains config details for this particular app, I'm not sure it is a node or express convention, but I find it useful. Generally this is kept out of the repo as it holds api keys and database credentials. What I can do is create an example config.json with dummy values for these things, so at least people can see the structure etc.
3 - Yes, at least a dump of the database schema would probably be useful for other people getting this up and running.
4 - I am running this on Ubuntu 10.04 without any issues on the codec name, perhaps though this is specific to the ffmpeg install, I don't know.
I think what will be useful for people who are getting started with the project on their own machines would be to have installation instructions, an accurate package.json with the correct dependencies and a copy of the config and database schema.
I'll look into making a start on this.
As for the xhr.js issue I'm not sure what to suggest, tbh a better implementation would be to use jQuery, at the time I built the app it was easier to just wrap the native XMLHttpRequest to get FormData working, however it is quite possible to do the same with jQuery you just have to set the processData
and contentType
options to false.
1: Strange. After installing Node, Express just complains that it's not compatible. Easy fix is to just set '3.0' as the express version in your package.json. Smooth sailing from then on.
2: It certainly is useful! :)
3: I installed through apt-get without any specifics. Could easily query the installed codecs to get the right name though.
This is the exact issue I get with the xhr request :
video:0kB audio:2726kB global headers:3kB muxing overhead 1.135908% Wed, 16 May 2012 16:56:41 GMT GET /stream/44181265 200 - 175102 ms TypeError: Cannot call method 'complete' of undefined
Not sure if this will be an issue for me though...
The basic plan is to attempt to try and get the audio analysis working on multiple browsers (all be it in a possibly degradeted state) and use WebGL and Three.js for the visualisation. Fingers crossed that works anyway :)