Hidden
Hidden

Reputation: 3628

How to play AVI files with FM?

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.

Upvotes: 2

Views: 2060

Answers (1)

fnkr
fnkr

Reputation: 10065

  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

Upvotes: 7

Related Questions