when I drop a file on the lcl form it works, as in the sdl window it doesn't.
Of course not.
When the PlayerComponent is created (= FPlayer:=TEXPlayer.Create(self)), it fills the
entire MainForm (= Align:=alClient).
Unlike FFPlay4Laz, Somby's PlayerComponent has no SDL-Code for UserInputs (Keys, Mouse, Touch), nor for DropFiles.
Therefore DropFiles cannot be done via the SDL-Window; it will only work with the MainForm, via ...
procedure Tmp_main.DoOpenUrl(url: string);
begin
if FOpenUrl then exit;
try
FOpenUrl:=true;
url:=trim(url);
if FPlayer.Playing and (url=FPlayer.Url) then exit; // es hat sich nichts geändert
FPlayer.Stop;
FPlayer.url:=url;
if FPlayer.Url='' then exit;
Application.ProcessMessages;
Play;
finally
FOpenUrl:=false;
end;
end;
If You still want DropFiles, when the Player is running, You may ...
• leave some Space in the MainForm, where You can drop Files on
• drop them on an other Form, e.g. the NavigatorForm
• add
the DropFiles-Code for the SDL-Window into Somby's PlayerComponent by Yourself or
• ask Somby to do so.