[Gambas-user] Supped up the WebAudio.class

Bruce Steers bsteers4 at gmail.com
Thu Jul 28 15:14:45 CEST 2022


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220728/0666a77c/attachment.htm>


More information about the User mailing list