Author: Lou Adler
How can I play an MPEG file in Delphi apps?
Answer:
Providing the Windows MMSystem layer has a MPEG decoder installed, you can easily
use the MultiMedia play a MPEG file by setting the filename to the path of the MPEG
file.
Example:
1 procedure TForm1.Button1Click(Sender: TObject);
2 begin3 MediaPlayer1.Filename := 'C:\DownLoad\rsgrow.mpg';
4 MediaPlayer1.Open;
5 MediaPlayer1.Display := Panel1;
6 MediaPlayer1.DisplayRect := Panel1.ClientRect;
7 MediaPlayer1.Play;
8 end;