[Gambas-user] Supped up the WebAudio.class

Bruce Steers bsteers4 at gmail.com
Thu Jul 28 15:24:01 CEST 2022


On Thu, 28 Jul 2022 at 14:14, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
> On Thu, 28 Jul 2022 at 13:58, Benoit Minisini <
> benoit.minisini at gambas-basic.org> wrote:
>
>> Le 28/07/2022 à 14:48, Bruce Steers a écrit :
>> >   * OPT: Do not reset play position to 0 on gw.sound.play() in lib.js so
>> >     audio can un-pause.
>>
>> This seems to not be backward-compatible...
>>
>> If I remember, the goal was that Play() always plays from the start.
>>
>> Now there is a paused state, it is possible to let Play() always start
>> from the start when the audio is not in paused state?
>>
>
> sure.
> i did this..
>
>     play: function(id)
>     {
>       var elt = $_(id);
>         if (!elt.paused)
>         {
>           elt.pause();
>           elt.currentTime = 0;
>         }
>       elt.play();
>     }
>   },
> Respects.
>

Maybe it would be better for compatibility to just add a new unpause
function instead and leave play() as is?

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220728/ae6c5dcc/attachment.htm>


More information about the User mailing list