Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to edit src/jscam.as as well if changing size #5

Open
cviebrock opened this issue Oct 23, 2011 · 14 comments
Open

Need to edit src/jscam.as as well if changing size #5

cviebrock opened this issue Oct 23, 2011 · 14 comments

Comments

@cviebrock
Copy link

The docs on the home page don't make it clear. I thought you only needed to edit the src/jscam.xml file if you wanted to recompile the Flash for a new size of cam.

Turns out the height/width are hard-coded into src/jscam.as as well (in two places for each), so be sure to edit that file.

@infusion
Copy link
Owner

Hi,

yes, the dimensions are hardcoded at two places. I tried to control both via the JS-params but it didn't actually work. If you've any suggestions on this, let me hear.

Robert

@matthewjohnston4
Copy link

Is there a max size limit with this? I've tried setting it to 1280 height and 720 width in jscam.xml, jscam.as and within the HTML source too, but I don't get any image put into the canvas?

@sshilko
Copy link
Contributor

sshilko commented Jan 11, 2012

need to edit

  1. xml
  2. as
  3. js

all 3 places contain 320x240

@matthewjohnston4
Copy link

Yeah, I've edited all of those files (it'd be great if they were documented) and no luck.

I'm using the 'callback' option, writing to the canvas and then in the onCapture callback I'm making a POST to a php file with a canvas.toDataURL call in it. Once the resolution of the image captured goes above 854x480 or thereabouts, the image is still successfully output to the canvas, but only a blank image is ever saved by the php file. I presume there is something to do with file size limit or character limit with the base64 string causing this but I can't figure it out, I've even edited the php.ini file to change max file upload size etc.

@sshilko
Copy link
Contributor

sshilko commented Jan 11, 2012

there is a limit for POST data, and callback method does NOT return base64 image , it returns pixel colors.. you have to deal with them separate or might give a try because i already dealt with them here
https://github.com/sshilko/jQuery-AS3-Webcam

iam not using canvas, all output is pure thru javascript
and only call is save() wich does return base64(jpeg) image which i send thru POST with ajax

@matthewjohnston4
Copy link

Actually, when you use the callback method, you can then use the standard HTML5 canvas methods to grab the image from the canvas and convert it to base64, this is what canvas.toDataURL does. You can see the code I'm using here:
http://pastebin.com/ZyMZQCQ0

Note that I'm very confident in the functionality in that code - it works 100% for images that are at resolution 854 x 480 or lower but as soon as you hit a particular resolution it craps out.

@sshilko
Copy link
Contributor

sshilko commented Jan 11, 2012

canvas is html5 i cant go with html5 yet.. and i have no reasons to use it because everything can be done in html4

sorry for personal letters here in comments :)

@matthewjohnston4
Copy link

Never mind me, I found the reason, there was a php.ini setting for something called Suhosin that was setting a max length for POST values. Changed that and solved the problem :)

@Foovanadil
Copy link

I made all the changes mentioned but get an error on make:

src/jscam.as:22: characters 16-26 : type error class not found : flash.display.BitmapData

Any ideas?

@sshilko
Copy link
Contributor

sshilko commented Jun 4, 2012

your not using AS3, your using AS2, or you dont have full Adobe Flex SDK installed

@sshilko
Copy link
Contributor

sshilko commented Jun 4, 2012

ehm.. why iam receiving notifications of issues here :| donnow.. (away)

@Foovanadil
Copy link

Ok so I am not totally sure I follow.

As far as the ActionScript version goes, I am using the ActionScript files from this repo (don't know what version that is). Is there some way for me to know what version of ActionScript I have on my machine that is trying to compile?

I installed the flx sdk onto my machine following these instructions: http://www.linuxdict.com/2010-03-install-and-set-up-adobe-flex-sdk-on-linux/

and tested and can see the sdk from the command line. It shows

[root@localhost flex]# mxmlc -version
Version 4.6.0 build 23201

so I am clearly missing something I think

@Foovanadil
Copy link

Ahh, so I see that mtasc (which is specified as the way to compile this thing on linux) only supports ActionScript 2.... So how did others get this thing to compile? All I want to do is change the size of the video and this seems to be the only way to do this?

@sshilko
Copy link
Contributor

sshilko commented Jun 5, 2012

i suggest you to use my AS3 implementation of this stuff, dont mess with AS2 its painfully SLOW
https://github.com/sshilko/jQuery-AS3-Webcam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants