To specify that both bandwidth and quality are equally important, pass numeric values for
both parameters. Flash will transmit video that achieves the specified quality and that
doesn't exceed the specified bandwidth. If necessary, Flash will reduce the frame rate to
maintain picture quality without exceeding the specified bandwidth.
Availability: ActionScript 1.0; Flash Player 6
Parameters
[optional] - An integer that specifies the maximum amount of bandwidth
bandwidth:Number
that the current outgoing video feed can use, in bytes per second. To specify that Flash video
can use as much bandwidth as needed to maintain the value of
. The default value is 16384.
bandwidth
[optional] - An integer that specifies the required level of picture quality, as
quality:Number
determined by the amount of compression being applied to each video frame. Acceptable
values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no
compression). To specify that picture quality can vary as needed to avoid exceeding
bandwidth, pass 0 for
Example
The following examples illustrate how to use this method to control bandwidth use and
picture quality.
// Ensure that no more than 8192 (8K/second) is used to send video
active_cam.setQuality(8192,0);
// Ensure that no more than 8192 (8K/second) is used to send video
// with a minimum quality of 50
active_cam.setQuality(8192,50);
// Ensure a minimum quality of 50, no matter how much bandwidth it takes
active_cam.setQuality(0,50);
See also
get (Camera.get method)
(Camera.bandwidth property)
width (Camera.width property)
public width : Number [read-only]
The current capture width, in pixels. To set a desired value for this property, use
.
Camera.setMode()
Availability: ActionScript 1.0; Flash Player 6
. The default value is 0.
quality
,
quality (Camera.quality property)
, pass 0 for
frameQuality
,
bandwidth
Camera
403
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?