Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / HTML Export in Studio has no sound. AGK classic does not export to html

Author
Message
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 23rd Nov 2023 18:55
I just installed the newest version of agk studio (2023 08 23) and agk classic bronze pledger 2023 10 24 and found some problems with the HTML export.

STUDIO:
With studio, I exported a game to html, and it works when installed on the server, but no sound. What I do usually is pack it on NW.JS but test first on a live server.
Tried other games from the samples and none of them has sound on the browser.
The debug console on the browser shows "the audio context was not allowed to start, waiting for the user to make a gesture" or something like that. This means that the user must load the page and do some clickng or touching the screen before this thing times out. If the user does that in time, it will play sound. After some seconds it seems that there is a timeout and sound will not play.
That can be solved with javascript but since the export is minified and obfuscated, is no easy task. It should be done by AppGameKit when exporting.

CLASSIC:
The classic version did not export to html because a player javascript was missing from the install. I just copied the javascript files from the Studio installation and now it exports. Audio problem is the same is the same as Studio.
May the 3d force B with U
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 23rd Nov 2023 23:26 Edited at: 24th Nov 2023 00:10
Just exported some HTML game with Classic and Studio ( latest versions ), no sound on both.
Worked in the past.

(EDIT) Downloaded a HMTL game from itch.io that HAS SOUND and IS WORKING on itch.io.
On my private page, no sound, UNLESS I reload the page and hit instantly RETURN to go into fullscreen.


(EDIT2) I updated some Java stuff on my PC about a month ago, so I'm guessing itch.io runs an older Java version where the sound still works?

PSY


PSY LABS Games
Coders don't die, they just gosub without return
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 24th Nov 2023 07:50
i'm exporting classic with zero issues @ itch. it sounds like a local permissions thing. @ itch, users have the OPTION to click which implies consent to play sound, etc.
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 24th Nov 2023 16:41
FYI, am not using Itch or similar, but my own web server instead.
I found this interesting note in Chrome that indicates that there are some conditions where sound is played (without the user having a timeout for sound), like creating a PWA (meaning a NW.JS app could work), or the user adding the bookmark to Chrome home.

https://developer.chrome.com/blog/autoplay/#webaudio
May the 3d force B with U

Login to post a reply

Server time is: 2024-05-03 00:39:50
Your offset time is: 2024-05-03 00:39:50