Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > Camera class > Camera.setLoopback() | |||
publicsetLoopback(compressLocalStream: Boolean) : Void
compressLocalStream A Boolean value that specifies whether to use a compressed video stream (true) or an uncompressed stream (false) for a local view of what the camera is receiving. The default value is false.
Nothing.
Method; specifies whether to use a compressed video stream for a local view of the camera. This method is generally applicable only if you are transmitting video using the Flash Media Server; setting compressLocalStream to true lets you see more precisely how the video will appear to users when they view it in real time.
Although a compressed stream is useful for testing purposes, such as previewing video quality settings, it has a significant processing cost, because the local view is not simply compressed; it is compressed, edited for transmission as it would be over a live connection, and then decompressed for local viewing.
To set the amount of compression used when you set compressLocalStream to true, use Camera.setQuality().
In the following example, if the user presses a loopback button, the loopback value is set to true:
on (press) {
if (_root.active_cam.loopback==false) {
_root.active_cam.setLoopback(true);
} else {
debugWindow+="You're already compressing the stream." + newline;
}
Camera.loopback, Camera.setQuality()