unit fPlayerWeb;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes,
  System.Variants, FMX.Styles, IdHTTPWebBrokerBridge, IdGlobal, Web.HTTPApp,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Controls.Presentation, FMX.Layouts, FMX.ListBox, uPlayerThread,
  bass_simple, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, FMX.Edit;

type
  TfrPlayerWeb = class(TFrame)
    Label1: TLabel;
    Edit1: TEdit;

  private
    mp: TBassSimple;
    Player: TPlayerThread;
    FServer: TIdHTTPWebBrokerBridge;
    procedure StartServer;
  public
    procedure init;
    destructor Destoy(Sender: TObject; var Action: TCloseAction);
  end;

implementation

{$R *.fmx}

destructor TfrPlayerWeb.Destoy(Sender: TObject; var Action: TCloseAction);
begin
  FServer.Active := False;
  FServer.Bindings.Clear;
  Player.Free;
mp.Free;
end;

procedure TfrPlayerWeb.init;
begin

  FServer := TIdHTTPWebBrokerBridge.Create(Self);
  StartServer;
end;

procedure TfrPlayerWeb.StartServer;
begin
  if not FServer.Active then
  begin
    FServer.Bindings.Clear;
    FServer.DefaultPort := 8088;
    FServer.Active := True;
  end;


end;

end.
