
Client-Side Communication ActionScript 23
To determine how to set a value for keyframeInterval, consider both bandwidth use and video
playback accessibility. For example, specifying a higher value for
keyframeInterval (sending
keyframes less frequently) reduces bandwidth use. However, this may increase the amount of time
required to position the playhead at a particular point in the video; more prior video frames may
have to be interpolated before the video can resume.
Conversely, specifying a lower value for
keyframeInterval (sending keyframes more frequently)
increases bandwidth use, because entire video frames are transmitted more often, but may
decrease the amount of time required to seek a particular video frame within a recorded video.
See also
Camera.keyFrameInterval
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;
}
Komentarze do niniejszej Instrukcji