Jump to content

Linuxuser1234

Members
  • Content Count

    65
  • Joined

  • Last visited

Posts posted by Linuxuser1234


  1. @Rollo62  also how would i change   a tlabel text based on what angle the knob is set to for example if the angle is at 15deg

    the tlabel would  display another text and i do know how to set the text just not sure how to set the text based off the knob angle 


  2. @Remy Lebeau i dont hear any audio and  after i close the popup window i cant close out of my main application like i have to go to task manager and close it from there but the main app doesn't freeze or anything i can still open my popup windows 

    procedure TForm7.Button1Click(Sender: TObject);
    //This Button Connects to weatherusa radio server and change
    //a few labels caption
    begin
    Label2.Text := '162.550 MHz';
    Label6.Text := 'Status: Connected';
    Label5.Text := 'KEC61';  //default Wx radio Station
    Label7.Text := 'AL'; //default state
    Label8.Text := 'Mobile';
    Button1.Text := 'Click to disconnect from weatherusa.net';
    MediaPlayer1.FileName := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3';
    MediaPlayer1.Play;

     


  3. @Remy Lebeau i wrote this idhttp how would i use this procedure when i click on a button i have tried override but that wouldn't work 

    procedure TForm7.IdHTTP1Authorization(Sender: TObject;
      Authentication: TIdAuthentication; var Handled: Boolean);
    var
    get_url: string;
    resp: TmemoryStream;
    begin
    // connect to weatherusa
    get_url := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3';
    resp := TMemoryStream.Create;
    idHTTP1.Get(get_url+'v', resp);
    end;

     


  4. in delphi i made a popup window that looks like a weather radio and i would like to stream audio from a website url using idHTTP and then streaming the audio from that website using Tmediaplayer component 

    i cant find any working examples anyone have any suggestions on how i can connect to a website and stream audio from a mediaplayer on button click 


  5. here is the full unit file code 

    unit Unit7;
    
    interface
    
    uses
      System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
      FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
      FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.Effects, FMX.Edit,
      FMX.ComboEdit, FMX.Media, IdBaseComponent, IdComponent, IdTCPConnection,
      IdTCPClient, IdHTTP, IdMessage, IdAttachment, IdAuthentication;
    
    type
      TForm7 = class(TForm)
        ArcDial1: TArcDial;
        Rectangle1: TRectangle;
        Label1: TLabel;
        Label2: TLabel;
        Label4: TLabel;
        Label5: TLabel;
        ShadowEffect1: TShadowEffect;
        ComboEdit1: TComboEdit;
        Image1: TImage;
        Button1: TButton;
        Image2: TImage;
        Label3: TLabel;
        Button2: TButton;
        Image3: TImage;
        Image4: TImage;
        RoundRect1: TRoundRect;
        Line1: TLine;
        Rectangle2: TRectangle;
        Rectangle3: TRectangle;
        GlowEffect1: TGlowEffect;
        Label6: TLabel;
        MediaPlayer1: TMediaPlayer;
        IdHTTP1: TIdHTTP;
        Label7: TLabel;
        Label8: TLabel;
        RoundRect2: TRoundRect;
        Label9: TLabel;
        procedure Button1Click(Sender: TObject);
        procedure IdHTTP1Authorization(Sender: TObject;
          Authentication: TIdAuthentication; var Handled: Boolean);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form7: TForm7;
    
    implementation
    
    {$R *.fmx}
    
    procedure TForm7.Button1Click(Sender: TObject);
    //This Button Connects to weatherusa radio server and change
    //a few labels caption
    begin
    Label2.Text := '162.550 MHz';
    Label6.Text := 'Status: Connected';
    Label5.Text := 'KEC61';  //default Wx radio Station
    Label7.Text := 'AL'; //default state
    Label8.Text := 'Mobile';
    Button1.Text := 'Click to disconnect from weatherusa.net';
    end;
    procedure TForm7.IdHTTP1Authorization(Sender: TObject;
      Authentication: TIdAuthentication; var Handled: Boolean);
    
    begin
    // connect to weatherusa
    
    end;
    initialization
     TSkTypefaceManager.RegisterTypeface('C:\Boltgui\Popups\Font\DSEG14ClassicMini-Bold.ttf');
    end.

     

×