| By Renaun Erickson | Article Rating: |
|
| December 1, 2006 04:00 AM EST | Reads: |
55,004 |
The video conference view is now ready to be created. The video conference view consists of a panel, tile, and repeater control. The repeater, with dgUsers as the data provider, will create a custom VideoPod control for each user. Although the video component is custom, the guts are quite simple. You will find the full source of the VideoPod in Listing 3. The idea is to first check if the user is a sender or receiver. If it's a sender, you attach the camera and microphone to the Net Stream object and publish it to the server.
public function init():void
{
ns = new NetStream( nc );
...
camera = Camera.getCamera();
...
ns.attachCamera( camera );
microphone = Microphone.getMicrophone();
ns.attachAudio( microphone );
ns.publish( userItem.identifier )
}
When the custom VideoPod is to display the receiving video feeds, the component creates a stream and calls the play method.
video.attachNetStream( ns );
ns.play( userItem.identifier );
The video class in Flex 2 is used to display video streams. A simple VideoContainer class is found in Listing 4 and is used in the VideoPod component to make it easier to add any video object as a UIComponent. This is needed because the video class is not a UIComponent, so it can't be added as a child to the panel class directly. The VideoPod now is ready to be put into the video conference view control using the repeater inside a tile control.
<!-- Video Panel -->
<mx:Panel id="pnlVideo"
width="100%" height="100%"
title="Welcome { txtName.text }!"
layout="vertical">
<mx:Tile height="100%" width="100%">
<mx:Repeater id="rpUsers"
dataProvider="{ dpUsers }">
<VideoPod
nc="{ nc }"
isSender="{ rpUsers.currentItem.name == txtName.text }"
userItem="{ rpUsers.currentItem }" />
</mx:Repeater>
</mx:Tile>
</mx:Panel>
Now, you can put it all together, compile it, and try it out for yourself. The application's structure consists of the main mxml application called FlexVideoMain.mxml (see Listing 2), VideoPod.mxml (see Listing 3), and VideoContainer.as (see Listing 4). Complementing the client application the FMS server application requires main.asc (see Listing 1) to be placed in flex_videoconference folder in the applications area. The application provides a simple one room multi-user video conference solution. Of course, the maximum number of users possible in each video conference will depend on bandwidth. There are other considerations in creating live, media-rich applications like latency, quality of the video, and frame rates (which affects perceived latency).
Published December 1, 2006 Reads 55,004
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Renaun Erickson
Renaun Erickson is a RIA developer specializing in Flex, ColdFusion, and PHP, and he is a Flex Adobe Community Expert. He is active in the community through http://renaun.com/blog/, as well as the local Las Vegas Adobe User Group http://vegasaug.org.
![]() |
linden.hocking@blakedawson.com 12/02/08 07:35:49 PM EST | |||
Hi Renaun This provides a fantastic plugin that I'm using in a Confluence wiki. Is there anyway to modify the quality of the video? Thanks |
||||
![]() |
steve M 08/27/07 01:54:08 AM EDT | |||
That's really a smart and quick sloution for video conferencing, without much efforts and time. |
||||
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Ph.D. in Twitter Anyone?
- Eolas Sues the Internet
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Special Report on the Emerging Cloud Computing Trend
- Adobe Cans Another 9% of its Workforce
- My Thoughts on Ulitzer
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Ulitzer Live! New Media Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Software Flexibility in the Cloud - Part 4 of 5
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets




































