[Gambas-user] Supped up the WebAudio.class

Bruce Steers bsteers4 at gmail.com
Wed Jul 27 13:57:30 CEST 2022


want a upgraded up WebAudio Ben?

Mods make it MUCH more useful.

I basically made a web player and needed these changes to make it better.

https://gitlab.com/bsteers4/gambas/-/tree/WebAudio-upgrade

changes...

[GB.WEB.GUI]
* NEW: WebAudio.AutoPlay, Autoplay audio on loading.
* NEW: WebAudio.OtherSources for alternative <source> items.
* NEW: WebAudio.UnsupportedText sets message to display if browser
does not support audio..
* NEW: WebAudio_Ready(Duration as Float) event fires when audio loads
and contains track length.
* NEW: WebAudio_TimeUpdate(Position As Float) event fires as audio
plays with time pos.
* NEW: WebAudio_Ended() event fires when a track finishes
* NEW: WebAudio_HasPaused() event triggers when audio pauses.
* New: WebAudio.SetPosition(Position As Float) sets playback position.
* NEW: Use an observer to get event data internally.
* NEW: Property WebAudio.Duration gets song length.
* NEW: Property WebAudio.Position, get or set song position.
* NEW: Property Paused gets or sets paused state.
* OPT: clean up code and add inline wiki help.

So with that we have quite a useable AudioPlayer able to get/set pos,
get duration, useful events.

with it i have made a web player with my own controls and a slider to
show/set pos.

Wishing well

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


More information about the User mailing list