Audio Engine Cannot read properties of undefined (reading 'unlocked')

In previous version it was working properly now this is giving an error.
currently I’m using the cdn.

babylonjs-animation.js:4 Uncaught TypeError: Cannot read properties of undefined (reading 'unlocked')
    at window.addEventListener.once (babylonjs-animation.js:4:37)
  () => {
    if (!BABYLON.Engine.audioEngine.unlocked) {
  { once: true }

To me it appears that the issue is not related to unlocked, but to the fact that your BABYLON.Engine.audioEngine itself is undefined

Maybe this topic might help ?

I’ve never used directly the BABYLON.Engine.audioEngine to be honest, and I don’t know if it’s supposed to be created by default…

    BABYLON.Engine.audioEngine = BABYLON.Engine.AudioEngineFactory();

This works, but maybe it’s not meant to be created manually, I don’t know :grin:


1 Like

Yes, this is the issue. It will be fixed soon (PR already submitted)