0

Is it possible to play MP3 files using the VideoDisplay or VideoPlayer components?

Thank you.

Francisc
  • 77,430
  • 63
  • 180
  • 276

2 Answers2

1

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.

timwjohn
  • 277
  • 1
  • 3
  • 11
0

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();
J_A_X
  • 12,857
  • 1
  • 25
  • 31
  • I want the controls as well and the video component for the site I need it to play sound is already drawn and all that. SO, can it play MP3 files is still the question. Thanks. – Francisc Apr 12 '11 at 12:45
  • Not unless their in the same stream. – J_A_X Apr 12 '11 at 12:57