YOUR FEEDBACK
Optimizing Database Performance in J2EE Applications
kasiazaki wrote: dfdf
SYS-CON.TV

2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts

MXDJ TOP LINKS YOU MUST CLICK ON !


Video Conference with Flex & FMS
Learn how to use Flex 2 and FMS 2 by creating a basic video conference application

Digg This!

Page 2 of 2   « previous page

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).


Page 2 of 2   « previous page

About 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.

YOUR FEEDBACK
Video Conference with Flex & FMS
steve M wrote: That's really a smart and quick sloution for video conferencing, without much efforts and time. http://www.sony-conferenc ing.com/
read & respond »
INTERNET TV LATEST STORIES . . .
It's the Video, Stupid
Having peered into various crystal balls, Cisco figures global Internet traffic will grow 46% a year between now and 2012, nearly doubling every two years. The projection translates into an annual bandwidth demand of more than a half a zettabyte, the equivalent of at least 125 billion
AJAX and Enterprise RIA Tools - JSF, Flex, and JavaFX
2008 is going to be an important year for Rich Internet Applications. Most organizations are delivering or planning to deliver Rich Internet Applications; however, at the same time, most IT managers are facing a dilemma: which Rich Internet Application technology and platform to use? T
SYS-CON's Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
Virtualization - Dvorak Comments on AMD Intel Lawsuit on SYS-CON.TV
Conference in San Francisco. Dvorak held forth on a number of topics, including the new AMD/Intel lawsuit, the viability of Java and Sun, the value of (or lack thereof) of corporate PR, and whether or not a new book about Silicon Valley is really worth reading.
Steve Jobs Loses His Mind - Sues "The Big Apple"
Friday morning the local Fox television station in New York City broke the news - Apple was suing New York City. Six out of 100 of their viewers thought Apple had the right to sue the City, but 94 out of 100 viewers are now calling for New Yorkers to drop Apple and its products, includ
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING INTERNET TV NEWS
Chicago Public Schools' New Web Site Makes It Easier for Parents to Get Involved, Find Information
Chicago Public Schools (CPS), the third-largest public school system in the U.S., announc