How is it possible to change the FileName at run-time, so that the video is changed by clicking a button?
I used this code, but the video in the Panel didn't change to the next videoclip.
procedure TsomeForm.NextClick(Sender: TObject);
var
videofile:string;
begin
{Prepare for video}
Videofile:= X;
If FileExists(Videofile)
then MediaPlayer1.filename:= Videofile;
end;
X is a proper file name e.g. C:xyzxyz.mpeg
Your help will be greatly appreciated.
Comments
:
: I used this code, but the video in the Panel didn't change to the next videoclip.
:
: procedure TsomeForm.NextClick(Sender: TObject);
: var
: videofile:string;
: begin
: {Prepare for video}
: Videofile:= X;
: If FileExists(Videofile)
: then MediaPlayer1.filename:= Videofile;
: end;
:
:
: X is a proper file name e.g. C:xyzxyz.mpeg
:
: Your help will be greatly appreciated.
:
You need to call Open() after changing the filename to actually open the media-file. See the online help on TMediaplayer.Filename.