I would like to play AAC audio format file from local disk. I got example to play through netstreaming but I need to play it from local disk. I got an example to play mp3 file from local disk using Sound class.
For reference: http://www.adobe.com/devnet/flashmediaserver/articles/audio_playlist_开发者_运维技巧app_05.html
Here's an example:
<fx:Script>
[Bindable]
public var aacUrl:String = "http://amp-mp3.s3.amazonaws.com/48c30f3b-e1ed-4f04-a58b-4806fcc27416?Expires=1602460800&AWSAccessKeyId=AKIAJU2DNJUS3E3D36BA&Signature=h6HUy35V1QOi56fm9kakaCRjma4%3D";
protected function playButton_clickHandler(event:MouseEvent):void
{
videoPlayer.play();
}
</fx:Script>
<s:VGroup>
<s:VideoPlayer id="videoPlayer" height="200" width="300" source="{aacUrl}" autoPlay="false"/>
<s:HGroup width="100%">
<s:Label text="URL:" />
<s:TextInput id="mediaUrlTextInput" width="100%" text="@{aacUrl}" />
<s:Button id="playButton" label="Play" click="playButton_clickHandler(event)" />
</s:HGroup>
</s:VGroup>
精彩评论