Question

Can someone tell me how to play AVI files with FireMonkey? Which component should I use?

I searched in all componenets but didn't find anything useful.

Was it helpful?

Solution

  1. Add TMediaPlayer to your form
  2. Add TMediaPlayerControl to your form
  3. Add TButton to your form
  4. Duoble click on your button
  5. Insert this between begin and end tag

if MediaPlayer1.Media <> nil then begin MediaPlayer1.Play; end;

It should look like this:
Screenshot

  1. Change C:\earth.avi to the location of your avi file

Result:

Screenshot

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top