Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
Per CHANGELOG, since Version 3.53.0 phaser3 is preventing `AudioContext was not allowed` warnings, but I still encounter it, how do I do?

Per the CHANGELOG, since Version 3.53.0 - Anastasia - 8th March 2021

SceneManager.loadComplete will no longer try to unlock the Sound Manager, preventing AudioContext was not allowed to start console warnings after each Scene finishes loading.

However, each time I run a phaser3 app on Chrome 96.0.4664.110 (Official Build) (x86_64)

var game = new Phaser.Game();
<script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.js"></script>

I still get that annoying warning.

enter image description here

Am I missing something?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The problem is, that this is a browser "issue" (look at this link, for a chromium example: https://bugs.chromium.org/p/chromium/issues/detail?id=943258#c6)
the browser, outputs this warning, if you create an AudioContext without user interaction. Phaser creates an AudioContext on creating a Phaser Game Object new Phaser.Game(...);.

If you want to get rid of the Warning message, I have two different ideas, how you could do this:

Option 1:
Make a simple html-page with a start button/image/... and only create the Phaser.Game Object after a user iteraction, then there would be no Warning. (this is "cleaner", abit of overhead)

let button = document.querySelector('#btnStart');

button.addEventListener('click', () => {
    var game = new Phaser.Game();
});
<script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.js"></script>
<button id="btnStart"> Start </button>

Option 2:
Or you could clear the console, with console.clear(); after creating the object. (easy quick fix)

var game = new Phaser.Game();
console.clear();
<script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.js"></script>

Just so that you know the Warning has no effect, a can be ignored.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda