Jump to content

mp3 and htmlframe


AntonioCuomo

Recommended Posts

This works perfectly :

procedure TMainForm.UniButton1Click(Sender: TObject);
var s1 : string;
begin
UniHTMLFrame1.HTML.Clear;
unilabel1.Caption := Format(s,[fdtable1Voce.asstring]);
s1 :='13882870_1645790550.mp3'; //fdtable1Voce.asstring ;
UniHTMLFrame1.HTML.Text := Format(s,[s1]);

end;

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
s:=  '<audio controls autoplay id="player3" src="files/%s"></audio>';
end;

Instead this doesn't work:

procedure TMainForm.UniButton1Click(Sender: TObject);
var s1 : string;
begin
UniHTMLFrame1.HTML.Clear;
unilabel1.Caption := Format(s,[fdtable1Voce.asstring]);
s1 := fdtable1Voce.asstring ; //'13882870_1645790550.mp3';
UniHTMLFrame1.HTML.Text := Format(s,[s1]);

end;

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
s:=  '<audio controls autoplay id="player3" src="files/%s"></audio>';
end;

from debug both htmlfram1.htm.text of the first example and that of the second are the same ...

the idea is to have a table with the mp3 file name and have the reading by passing the filename field.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...