This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
66
|
Chapter 2: Communication Components
named common, you can play a file named recording.flv located there by specify-
ing
common/recording.
Buffer Time
This parameter, corresponding to the
bufferTime property, controls how much
of the stream will be buffered, in seconds, before playback begins. The default
value is 2 seconds. While longer times will add to the wait time users experience
before playback begins, overall playback performance may be improved because
there is less chance of video pausing due to network congestion.
Component process overview
When a VideoPlayback instance is initialized in a Flash movie and its connect( )
method is invoked by a SimpleConnect instance or a custom NetConnection object
that you have created, the VideoPlayback instance creates a new instance of FCPlay-
StreamClass, a class that is defined in the FCPlayStream_Class symbol (linkage ID
FCPlayStreamSymbol) of the component. This class inherits from the NetStream
class and augments its functionality by creating methods and properties that allow
streams to work smoothly with the control bar interface of the VideoPlayback com-
ponent.
VideoRecord
The VideoRecord component can publish and record an audio/video stream from a
Flash movie to a FlashCom application. The UI of the VideoRecord component,
shown in Figure 2-17, is similar to that of the VideoPlayback component. When the
component instance loads, the output from your local camera source is automati-
cally displayed in the video window. The leftmost button in the control interface is a
record start/stop toggle. The button to its right is a play/stop toggle, which allows
you to review your recorded stream. To its right is a buffering status display. While a
user records a stream, the buffering area is empty. When a user previews his stream,
the buffering area displays a progress bar indicating how much of the stream’s buffer
has been filled. A record/playback status indicator is shown to the right of the buffer-
ing display. When a stream is recording, the status indicator is a blinking red dot.
When a stream is being reviewed, the status indicator is a blinking blue dot.
You can use the VideoPlayback component in tandem with the VideoRecord compo-
nent. The VideoPlayback component offers more playback control of the recorded
stream than the play/stop button in the VideoRecord component. After you have
recorded a stream with the VideoRecord component, you can use an instance of the
VideoPlayback component to play the recorded stream.
Nested Flash UI components
The VideoRecord component does not use any nested Flash UI components. You
can find the skin symbols for the component in the Communication Components
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Summary of Communication Components
|
67
Core Assets - Developer Only VideoRecord Assets folder of your document’s
Library.
Client-side component parameters
The VideoRecord component has six settings in the Properties panel or Component
Parameters panel:
Default Stream Name
This parameter, corresponding to the
streamName property, specifies the name of
the stream that is recorded to the FlashCom application. You can use the same
conventions described earlier for the VideoPlayback component’s Default
Stream Name parameter.
Default Settings
This parameter controls which quality setting is applied to the Camera and
Microphone objects during recording. The quality setting properties are dis-
cussed later in this list. The default value is
setHigh, which is a reference to the
object specified by the High Quality Settings parameter. You can create your
own custom quality object and use it as the value of the
defaultSetting prop-
erty of a VideoRecord instance. Alternatively, you can pass this custom object to
VideoRecord.adjustSettings( ).
Buffer Time
This parameter, corresponding to the
bufferTime property, establishes the
amount of time, in seconds, that both the recording stream and the replay
stream use for buffering. The default is 10.
Low Quality Settings, Medium Quality Settings, and High Quality Settings
These parameters are used to adjust the quality of the Camera and Microphone
objects’ output to the recording stream. These settings control the default values
Figure 2-17. The runtime look of the VideoRecord component

Get Programming Flash Communication Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.