BABYLON.Engine.audioEngine is missing

Hello,
Yesterday night everything was working but today when we run our web apps, we are getting the following error
BABYLON.Engine.audioEngine is undefined
Any ideas how that can be resolved
Thank you,
David

Yes this is my bad!
I pushed a big PR that breaks that code

It is in PR stage as we speak and should be live momentarily

Fix missing audio init by deltakosh ¡ Pull Request #14997 ¡ BabylonJS/Babylon.js (github.com)

2 Likes

Any estimates when the fix will be available? Or any work-around?

I am pushing a patch in a few minutes

2 Likes

Now I am getting a different error
TypeError: Cannot set properties of undefined (setting ‘useCustomUnlockedButton’)

Here is the line that triggers that
BABYLON.Engine.audioEngine.useCustomUnlockedButton = true;

Does this work -

BABYLON.AbstractEngine.audioEngine.useCustomUnlockedButton = true;

?

1 Like

No, I am getting this error
TypeError: BABYLON.AbstractEngine.audioEngine is undefined

can you share the PG where .Engine.audioEngine is failing?

It works in PG, but it does not work in my code and my code is very simple


function createScene() {
console.log(“create scene”);
BABYLON.AbstractEngine.audioEngine.useCustomUnlockedButton = true;

<do something>

}

Is that because I am pointing to the wrong Babylon files?
Here are files that I include

    <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
    <script src="https://assets.babylonjs.com/generated/Assets.js"></script>
     <script src="https://cdn.babylonjs.com/recast.js"></script>
    <script src="https://cdn.babylonjs.com/ammo.js"></script>
    <script src="https://cdn.babylonjs.com/havok/HavokPhysics_umd.js"></script>
    <script src="https://cdn.babylonjs.com/cannon.js"></script>
    <script src="https://cdn.babylonjs.com/Oimo.js"></script>
    <script src="https://cdn.babylonjs.com/earcut.min.js"></script>
    <script src="https://cdn.babylonjs.com/babylon.js"></script>
    <script src="https://cdn.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
    <script src="https://cdn.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
    <script src="https://cdn.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js"></script>
    <script src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.js"></script>
    <script src="https://cdn.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
    <script src="https://cdn.babylonjs.com/gui/babylon.gui.min.js"></script>
    <script src="https://cdn.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>

Not sure what happened, but now
BABYLON.AbstractEngine.audioEngine.useCustomUnlockedButton = true;
is working!
Huge thank you @Deltakosh and @RaananW !

1 Like