I have a videodisplay (spark) and camera.
public var camera:Camera;
...
livePreview.source = getDynamicStreamingVideoSource();
camera.setMode(camWidth, camHeight, 15);
livePreview.videoObject.attachCamera(camera);
...
<s:VideoDisplay id="livePreview" ... />
On some situation, somewhere in my code, I tried to programmatically resize both by calling camera.setMode(newWidth, newHeight) and setting livePreview.width = newWidth, livePreview.height = newHeight. This doesnt work well from what I've seen. livePreview resizes to the new width and height BUT not the camera, at least partially. for example, the orig size is 250, 250 and if i set 500 (W) and 250 (H) as the new size, the camera video will appear squished horizontally but the physical width stays at 250. now here is the catch, if i set livePreview.scaleMode to "stretch", the camera video will display the video exactly the way i want it to (undistorted, correct size, ratio intact).
Now unto my real problem: this doesn't work well performance-wise. the "stretch" really shows you it is stretching the video, taking at least a second to do it. too slow. i want it to work instantaneously w/o any effect. i also don't understand why does it need to be stretched when I'm specifying the correct width and same as the videoDisplay width. am I missing here?