Hey folks wondering if you can help me.
I am trying to compile locally the following: https://github.com/taboca/CamCanvas-API-
This is camcanvas a javascript api for a webcam. Anyhow - its build.sh remakes the swf for which the javascript makes calls to.
I git clone the repository and having installed mtasc and swfmill run ./build.sh
the build.sh file looks like this : https://github.com/taboca/CamCanvas-API-/blob/master/build.sh
This creates a new swf in the swf folder, however it is sized at 869 bytes and does not work, whereas the swfs in the examples folder are 1.89 KiloBytes and do work....so something must be going wrong with my build process.
When I go to try the new swf, the page does not ask me to allow the camera and microphone - it simply does not show any video at all.... help!
Can somebody please try to do what I have done and see if they can determine what I am doing wrong.
Thanks,
Andy
This seems to be a bug in the code. Better yet, the swf files in the
samples/*folders seem to be compiled from a different source then what's currently on github.Anyway, here are the comments I have on the situation:
samples/red-0.2. The version in the filename gives it away, anyway. This file has 868 bytes (darn, that one byte...), but except having a similar size it doesn't seem to be content-similar (i.e. the diff between this and the file I generated was pretty big content-wise)As I'm not very well versed in as2 myself, I could not figure out what exactly is a problem, but I found the following link:
which, on a side note, seems to be doing pretty much the same thing as this project and seems worth looking at.
I could make it work by changing this: - Take the xml from the above link and replace the contents of
library.xmlfile in the root of the project with that (I left the first xml line, but should work without that) - Change the following lines in thesrc/camcanvas.aswith the following:
A hacky combination, but... If you build this with the
build.shscript, you should get a 897-byte swf that should work.Note that you must use the html from the
red-0.2sample folder and you must first click onGet the Camera Listbutton, then change the camera (just pick the second (empty) item and go back to first, which should have a name of your camera as known to the system) in the combo box that gets populated. After you do this, you should get the Allow/Deny dialog from Flash (unless you explicitly enabled this) and it should work perfectly after that.Also, on my machine it did not work from the file stored locally - I had to put this on a (local) Web server to get it working. It probably has to do with the security restrictions. Keep that in mind if you try it in a similar way.
Hope this helps.