jjschwartz
Technical User
I'm trying to show an Mpeg in an TEdit control on my form.
My basic code is;
where I've set the MediaPlayer1.Display property to the Tedit control.
If I do this, the Mpeg briefly flashes maybe one frame and disappears.
If I set the MediaPlayer1.Display property to nil, the Mpeg plays successfully in its own window.
If I set the MediaPlayer1.Wait property to true, the mpeg plays successfully in the TEdit.
If I try to play an .avi instead of the .mpeg, while the Wait property is false, it plays successfully in the TEdit.
Any advice on getting the Mpeg to play in the TEdit with Wait=false? (I want to handle some events while movie is playing.) Any insights into why the .avi is working while the .mpeg is not?
TIA,
Jeff Schwartz
My basic code is;
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
MediaPlayer1.FileName := movie.mpeg;
MediaPlayer1.Open;
MediaPlayer1.Wait := false;
MediaPlayer1.Play;
end;
where I've set the MediaPlayer1.Display property to the Tedit control.
If I do this, the Mpeg briefly flashes maybe one frame and disappears.
If I set the MediaPlayer1.Display property to nil, the Mpeg plays successfully in its own window.
If I set the MediaPlayer1.Wait property to true, the mpeg plays successfully in the TEdit.
If I try to play an .avi instead of the .mpeg, while the Wait property is false, it plays successfully in the TEdit.
Any advice on getting the Mpeg to play in the TEdit with Wait=false? (I want to handle some events while movie is playing.) Any insights into why the .avi is working while the .mpeg is not?
TIA,
Jeff Schwartz