510
Chapter 7: ActionScript for Flash
Parameters
bandwidth
An integer that specifies the maximum amount of bandwidth 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
frameQuality
, pass 0 for
bandwidth
. The default
value is 16384.
frameQuality
An integer that specifies the required level of picture quality, as 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
frameQuality
. The
default value is 0.
Returns
Nothing.
Description
Method; sets the maximum amount of bandwidth per second or the required picture quality of
the current outgoing video feed. This method is generally applicable only if you are transmitting
video using Flash Communication Server.
Use this method to specify which element of the outgoing video feed is more important to your
application—bandwidth use or picture quality.
•
To indicate that bandwidth use takes precedence, pass a value for
bandwidth
and 0 for
frameQuality
. Flash will transmit video at the highest quality possible within the specified
bandwidth. If necessary, Flash will reduce picture quality to avoid exceeding the specified
bandwidth. In general, as motion increases, quality decreases.
•
To indicate that quality takes precedence, pass 0 for
bandwidth
and a numeric value for
frameQuality
. Flash will use as much bandwidth as required to maintain the specified quality.
If necessary, Flash will reduce the frame rate to maintain picture quality. In general, as motion
increases, bandwidth use also increases.
•
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.
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);
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...