Delphi Activex Trackbar
Posted: 28 May 2008 18:26
Hi
Anyone know how to link a trackbar to VLC player in delphi ? We use this code below to succesfully play DVD's.
I am not sure at what point to get the Length, because DVD's have menus(ifo files), so we have to get the length from the current chapter.
Thanks
Andy
procedure TfmMainVLC.Button6Click(Sender: TObject);
var
Reg: TRegistry;
options : variant;
begin
blVLCPluginFound := false;
// Is VLC ActiveX Plugin installed on this PC?
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKeyReadOnly('\Software\Classes\VideoLAN.VLCPlugin.1\') then begin
blVLCPluginFound := true;
end;
finally
FreeAndNil(Reg);
end;
if blVLCPluginFound then begin
VLCPlugin1 := TVLCPlugin.Create(Self);
VLCPlugin1.Parent := Self; // Means: Place the VLC-Player into Form1
VLCPlugin1.Width := 400;
VLCPlugin1.Height := 300;
VLCPlugin1.Top := 10;
VLCPlugin1.Left := 10;
VLCPlugin1.Show;
options := ':snapshot-path=d:\snapshots\12345.jpg';
VLCPlugin1.addTarget('V:', Options, VLCPlayListInsert, 0);
VLCPlugin1.play;
end else begin
ShowMessage('I am really sorry, but VLC (or its ActiveX Plugin) is currently not installed on this PC!');
end;
end;
Anyone know how to link a trackbar to VLC player in delphi ? We use this code below to succesfully play DVD's.
I am not sure at what point to get the Length, because DVD's have menus(ifo files), so we have to get the length from the current chapter.
Thanks
Andy
procedure TfmMainVLC.Button6Click(Sender: TObject);
var
Reg: TRegistry;
options : variant;
begin
blVLCPluginFound := false;
// Is VLC ActiveX Plugin installed on this PC?
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKeyReadOnly('\Software\Classes\VideoLAN.VLCPlugin.1\') then begin
blVLCPluginFound := true;
end;
finally
FreeAndNil(Reg);
end;
if blVLCPluginFound then begin
VLCPlugin1 := TVLCPlugin.Create(Self);
VLCPlugin1.Parent := Self; // Means: Place the VLC-Player into Form1
VLCPlugin1.Width := 400;
VLCPlugin1.Height := 300;
VLCPlugin1.Top := 10;
VLCPlugin1.Left := 10;
VLCPlugin1.Show;
options := ':snapshot-path=d:\snapshots\12345.jpg';
VLCPlugin1.addTarget('V:', Options, VLCPlayListInsert, 0);
VLCPlugin1.play;
end else begin
ShowMessage('I am really sorry, but VLC (or its ActiveX Plugin) is currently not installed on this PC!');
end;
end;