开发者

Flex 4: VideoDisplay can play MP3 files?

开发者 https://www.devze.com 2023-02-24 05:42 出处:网络
Is it possible to play开发者_如何学Go MP3 files using the VideoDisplay or VideoPlayer components?

Is it possible to play开发者_如何学Go MP3 files using the VideoDisplay or VideoPlayer components?

Thank you.


Actually, yes they can play MP3 files. I've just got it working by simply passing the path of the MP3 to a VideoPlayer component instance.

Although I wouldn't recommend using a video component to solely play audio files, I agree that it's sometimes appropriate to play a sound file in a video display component. In my case I have a mixed list of audio and video media items and want a unified preview area and playback/scrub controls.


Why would you use a video component to play a sound file? Either way, you should probably google before posting here. This is how you do it:

var snd:Sound = new Sound(new URLRequest("smallSound.mp3"));
snd.play();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号