Search code examples
delphivideofiremonkeyavi

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.


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