Hello I have this question why the progress bar reacts with a delay , is it due to an error in the MPLayer component ?
procedure TForm1.VideoBarMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
Ratio: Real;
Total, videoPos: Integer;
begin
if not (ssLeft in Shift) then Exit;
Ratio := X / VideoBar.ClientWidth;
Total := Trunc(VideoBar.MaxValue - VideoBar.MinValue);
videoPos := Trunc((Total * Ratio) + Trunc(VideoBar.MinValue));
VideoBar.Value := videoPos;
end;
procedure TForm1.VideoBarMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MPlayer.SendMPlayerCommand('seek '+inttostr(VideoBar.Value)+ ' 2');
end;