Using Communication Components > VideoRecord component > Using the VideoRecord component |
![]() ![]() ![]() |
Using the VideoRecord component
You can use this component as a video recorder, saving streams to the server. The following list describes two ways to use this component:
![]() |
Movie recorder: Use this component to capture video to the server for later playback. |
![]() |
Video notes: Record messages for another user to view later. |
To use the component in your application:
1 |
Make sure Flash Communication Server is running. |
2 |
Create a directory in the Flash Communication Server MX applications directory, and name it recplay_test. |
3 |
Drag the VideoRecord component onto the Stage and give it an instance name, such as |
4 |
Drag the VideoPlayback component onto the Stage and give it an instance name, such as |
5 |
Drag the SimpleConnect component onto the Stage. |
6 |
In the Property inspector for the SimpleConnect component, provide the following two parameters: |
![]() |
In the Application Directory text box, type the URI of the application you created in Step 2: |
![]() |
Double-click the Communication Components text box. In the Values dialog box that appears, click the plus sign (+) and type the instance name of the playback and record components: |
By providing these values, you are using the SimpleConnect component to handle the connection for the VideoPlayback and VideoRecord components. When the SimpleConnect component successfully connects to the server, the other components automatically connect to the server. |
|
7 |
Save and publish this file as recplay_test.swf. |
8 |
In the application's directory, create a file named main.asc with the following code: |
load("components.asc"); |
|
Note: You can also copy the main.asc file from another application directory to this application's directory. |
|
9 |
Open the SWF file or, in the Flash MX authoring environment, choose Control > Test Movie, and log in. |
Click the Record button of the VideoRecord component to record the default stream |
|
The stream to play back, |
Name Variable Description Default Stream Name String; the default value is Default Settings String; the default value is Buffer Time Number; the default value is 10. Indicates the length, in seconds, of the video data to buffer for recording. Low Quality Setting Object; contains the following values to use for the camera settings. width, 160 horizontal pixels height, 120 vertical pixels fps, 10 video frames per second bandwidth, maximum bandwidth to use, 0 (0 indicates unlimited) quality, video compression quality, 50 (0 indicates unlimited) key, keyframe interval, 10 keyframes rate, audio quality in Khz, 11 Khz Medium Quality Setting Object; contains the following values to use for the camera settings. width, 240 horizontal pixels height, 180 vertical pixels fps, 12 video frames per second bandwidth, maximum bandwidth to use, 0 (0 indicates unlimited) quality, video compression quality, 80 (0 indicates unlimited) key, keyframe interval, 12 keyframes rate, audio quality in Khz, 22 Khz High Quality Setting Object; contains the following values to use for the camera settings. width, 320 horizontal pixels height, 240 vertical pixels fps, 15 video frames per second bandwidth, maximum bandwidth to use, 0 (0 indicates unlimited) quality, video compression quality, 90 (0 indicates unlimited) key, keyframe interval, 5 keyframes rate, audio quality in Khz, 44 Khz
VideoRecord component Property inspector
streamName
video
. Specifies the name of the stream to initially load and play back.
[setLowsetMedsetHigh]
setHigh
. Indicates the camera settings to use when the component is initialized. The three possible settings are setLow
, setMed
, and setHigh
.
bufferTime
setLow
setMed
setHigh
![]() ![]() ![]() |