Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2020-09

many kind words to MR Michael Van Canneyt and MR Jean SUZINEAU

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

Thank you very very much for yours patience and kind access to my pleas. MR SUZINEAU yours code is really excellent and it have allowed Me to make what I have always wanted. Monitor several input editable boxes at The same time. With no need to confirm every editable box by pressing some button or by pressing one button which would be used to start The evaluation process for all editable fields. I would like to thank you for yours code. Without yours code, I would lost many many days by working with my wrong approach from 80S.
Dear MR
Van Canneyt
I Am very nicely impressed by The fact, that generated Javascript code is not suffering because of long delays when user press arrow keys when focus is active inside editable boxes. And I can even press The keys very fast with no delay.
May I ask you which unit defines The code which create The timer which work so effective. That approximately one Second after I press The last letter in The focused edit box system generates The dialog window with answer or system do other thinks which are specified inside The condition block? I know, that it is not very good idea triing to play with those timers, since if The code would search for changes too fast, it would cause Webbrowser to display dialog box that web page is not responding. So I think, that you have chosen The best tuned values. but I would like to look at The code to know, how it works.

Really, very well done.
When I Am so bless because of Pas2js.
How complex would be to create some procedure, which would play live MP3 streams? So Htmlwidgets unit could contain special code which would add HTMl5 audio tag similarly like buttons and other GUi elements are being created. I know, that WEBaudio is complex and it is not unit for novice users.
Or it would be too complex to extend htmlwidgets by supporting audio? Thank you very much for yours answers.

Reply by email

Jean SUZINEAU
to Mgr. Janusz Chmiel

I admire the work you do in Pascal without the aid of sight, and I imagine how difficult it can be for you.
I also admire the work of Mr. Van Canneyt and all the hive around FreePascal and Lazarus.
I'm sorry, I have been busy the last days, I could not answer you before.

I'm not sure what you mean by MP3 live streams (a web radio like IceCast2 ?), but for playing a simple static MP3 file I may have the solution.
I've written a  very simple TAudioWidget based on TWebWidget, around 15 lines.
I join a modified version of your project1.lpr with this code. For testing I used a mp3 hosted in my own app on github. It seems to work.

@Michael Van Canneyt: you can freely pick/modify TAudioWidget and put it in htmlwidgets if you want.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpr
Type: application/x-wine-extension-lpr
Size: 5007 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200916/3decf691/attachment.bin>

Reply by email

Mgr. Janusz Chmiel
to Jean SUZINEAU

aaI have tested The audio enhanced code and my screen reader report three sliders for volume, for moving inside audio but player do not start automatically. No audio can be listened.
Is it necessary to start it by extending The code by using some commands or command?
The evidence is, that audio is triing to work but no playback. So you are very near to make audio work with no need to add HTMl code to The starting .html file which initialize The Pascal compiled Javascript file.

Reply by email

Michael Van Canneyt
to Jean SUZINEAU: I admire the work you do in Pascal without the aid of sight, and I imagine how difficult…
Jean SUZINEAU wrote 15 lines
I admire the work you do in Pascal without the aid of sight, and I imagine how difficult it can be for you. I also admire the work of Mr. Van Canneyt and all the hive around FreePascal and Lazarus. I'm sorry, I have been busy the last days, I could not answer you before. I'm not sure what you mean by MP3 live streams (a web radio like IceCast2 ?), but for playing a simple static MP3 file I may have the solution. I've written a  very simple TAudioWidget based on TWebWidget, around 15 lines. I join a modified version of your project1.lpr with this code. For testing I used a mp3 hosted in my own app on github. It seems to work. @Michael Van Canneyt: you can freely pick/modify TAudioWidget and put it in htmlwidgets if you want.

Thank you, I will gladly do so.
I will also modify it to make a video widget ! :-)

Michael.

Reply by email

Jean SUZINEAU
to Mgr. Janusz Chmiel: aaI have tested The audio enhanced code and my screen reader report three sliders for…

There is an autoplay property in TJSHTMLAudioElement, I've added support for this.
I join the modified code.

Le 16/09/2020 à 09:18, Mgr. Janusz Chmiel a écrit :

I Am very sorry. Audio code work but not from Seamonkey. From GOogle Chrome.

May be a security problem related to CORS ?

In doubt I've added  CrossOrigin:= 'anonymous' , but I'm not sure. Eventually you can try to play a mp3 located in the same directory as project1.html.

I use Ubuntu 20.04, the code works for SeaMonkey 2.53.3 (and Firefox too).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpr
Type: application/x-wine-extension-lpr
Size: 5271 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200916/b72dd8da/attachment.bin>

Reply by email

Mgr. Janusz Chmiel
to Jean SUZINEAU

Oh yes. You are wonderful man. Thank you very very much. It is so good that it is possible to even play automatically with no need to click on play button in The embedded player window inside The browser. Now I can safely even make some happy to respondent by play some MP3 file for them, sure I must pay attention on The license. Thank you again.

Reply by email

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel

Autoplay property work like A charm for Seamonkey and I will test it for FIrefox. GOogle Chrome is over caughted about security and sound playback so it is necessary to press The play button. Seamonkey play automatically but do not show play and other buttons for playback. So as I can watch, developing universal player for many WEB browsers will not be very easy. But thank you again, because autoplay really work and if no, problem is in The over sensitive WeB browser rendering engine related to HTML5.

Reply by email

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel

Latest Microsoft Edge support perfectly autoplay feature. And this is very important, because many users will be using MIcrosoft Edge WEB browser for Windows 10.
Older Microsoft product Internet Explorer latest is over sensitive about security and user must confirm that activex and software on his page must be allowed. FOrtunately this is not true for GOogle Chrome. I will download latest Mozilla FIrefox to find out. But very important true is, that HTMLwidgets unit GUI creation routines are still compatible with all WEB browsers.

Reply by email