[Gambas-user] Supped up the WebAudio.class
Bruce Steers
bsteers4 at gmail.com
Sat Jul 30 02:08:46 CEST 2022
On Fri, 29 Jul 2022 at 11:13, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:
> Le 29/07/2022 à 10:53, Bruce Steers a écrit :
> >
> >
> > On Thu, 28 Jul 2022 at 16:20, Benoit Minisini
> > <benoit.minisini at gambas-basic.org
> > <mailto:benoit.minisini at gambas-basic.org>> wrote:
> >
> > Le 28/07/2022 à 15:41, Bruce Steers a écrit :
> > >
> > > I leave it in your oh so very capable hands :)
> > >
> > > Respects
> > > BruceS
> > >
> >
> > I have fixed a lot of problems in the last commit. Please look at it
> > carefully, and ask me if you don't understand why what you wrote was
> > wrong.
> >
> >
> > Seems I didn't use the correct naming convention for $sSources but
> > didn't see many actual "bug" fixes.
>
> 1) The way you handled the 'Source' property was incorrect. You must not
> store the reference of the array sent by the user, you had to make a
> copy so that the object owns the array. And you have to deal with NULL
> values.
>
ahh I see, will look into that.
> 2) You generated HTML without using the Html() conversion function,
> leading to possible incorrect HTML generation or worse (script
> injection...).
>
Aah i see, will be sure to use Html for any generated output then.
3) Your automatic detection of mimetypes didn't work.
>
okay yeah maybe not for audio x-wav but audio/ogg is accepted format so. 2
out of 3 eh ;)
> 4) The javascript emitted when setting the Position property was
> incorrect, because of a bad use of Str() instead of CStr(). Or use JS()
> like I did, if you want to be sure to emit syntactically correct
> javascript.
>
Ahh okay, i didn't think just a numeric float would produce any chars in
need of conversion but that's a valued note, thank you.
Try at least to never do bug #2 and bug #4 (confusion between Str and
> CStr) again in any of your projects. The other are less critical! :-)
>
Thanks again Ben, valued advice.
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220730/81a82bd4/attachment.htm>
More information about the User
mailing list