Using Communication Components > SetBandwidth component > Using the SetBandwidth component |
![]() ![]() ![]() |
Using the SetBandwidth component
This simple, powerful component automatically adjusts the quality of microphones and cameras that are published commensurate with the available upload bandwidth. You can use this component in all applications that publish live audio and video.
The following list describes two ways to use this component:
![]() |
Video conference: FCVideoConference uses the AVPresence component, which is designed to work with FCSetBandwidth, so the microphone and camera quality are automatically adjusted. |
![]() |
Presentation: The concept of presentation applications have one presenter and many listeners. In such applications, the AVPresence component frequently provides a video presentation. It is beneficial to use with the SetBandwidth component in these applications. |
To use the component in your application:
1 |
Make sure Flash Communication Server is running. |
2 |
Create a directory in the Flash Communication Server applications directory, and name it setBand_test. |
3 |
Create a file named main.asc in the setBand_test directory 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. |
|
4 |
In Flash MX, drag the SetBandwidth component onto the Stage. |
5 |
In the Property inspector give the component an instance name, such as |
6 |
Drag the SimpleConnect component onto the Stage. |
7 |
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 that you created in Step 2: |
![]() |
Double-click the Communication Components text box. In the Values dialog box that appears, click the plus sign (+), type the instance name of the SetBandwidth component (for example, |
By providing this value, the SimpleConnect component handles the connection for the SetBandwidth component. When the SimpleConnect component successfully connects to the server, the SetBandwidth component automatically connects to the server. |
|
8 |
Save and publish the file as setBand_test.swf. |
9 |
Open the SWF file or, in the Flash MX authoring environment, choose Control > Test Movie, and log in. |
You can set different bandwidths, as shown in the following figure: |
![]() ![]() ![]() |