Tuesday, 17 July 2012

How to Play Video and Mp3 Files in Flex

How to Play Video and Mp3 files in Flex.

Flash Builder has it own VideoPlayer Control to play your Flv files, all you need is just set the source property.
ex :
<s:VideoPlayer id="myVidPlayer" source="/a.flv" autoPlay="true"/>

But for playing Mp3 Files Flex does not provide any special player for it.
To play Mp3 files you need to use
SoundTransform class : Contains properties for volume and panning.
Sound object to load your sound files, still there are no visuals available to display status for record we are playing.

In Following Example You will get skin Mp3 Player
with PAUSE-PLAY, Volume Controller. And Video  Player.
 You just Need to Set
myVideos List of all your video Url
myMp3 List of all your Mp3 Url.

Download Project Here

No comments:

Post a Comment