Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!