Client-Side Communication ActionScript > Camera.setLoopback

 

Camera.setLoopback

Availability

Flash Player 6.

Flash Communication Server MX (not required).

Usage

activeCamera.setLoopback(compressLocalStream)

Parameters

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.

Returns

Nothing.

Description

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 Communication 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.

Example

In the following example, if the user presses a loopback button, the loopback value is set to true.

on (press) {

	if (_root.myCam.loopback==false) {
		_root.myCam.setLoopback(true);
	} else {
		debugWindow+="You're already compressing the stream." + newline;
	}

See also

Camera.loopback, Camera.setQuality