Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
bug: sound in webgl

Dieter
Guest
Quote
2023-08-26 00:24:37

Pity that 3D sounds in the webgl target are not really 3D, but what's worse and a real bug is that when the page loads, the script will play those sounds before the user was clicking anything. Due to browser security restrictions, playing a sound must follow a user action, such as click, key, tab focus, otherwise the sound is not played - never in the case of a looped 3D sound. When you click the canvas during loading, it works. Not 3D, but it works.
Best option seems to load a start scene, containing a start button, that then switches to the actual game scene, so then you have your initial click.

Although, there is also a nasty pause when it loops the sound (ogg), almost half a second - that's too to be considered a show-stopper. MP3 is not listed as safely supported by the webgl target, in the CC reference. (So it's not supported?)

Meanwhile there is the mini3dsoundengine.js that I wrote some time ago. It's not perfect or elegant, but at least the whole player angle stereo panning stuff works. It is not yet fully integrated into a plugin, but that seems feasible. In case anyone wants to give it a shot:
https://jfkeo1010etc.itch.io/mini3dsoundenginejs


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact