Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: Sound
Phaser.Sound
Source: src/sound/index.js (Line 8)

Classes

Namespace

Methods

<static> SoundManagerCreator(game)
Focus
Focus

Description:

Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.

Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

Parameters:

name type description
game Phaser.Game

Reference to the current game instance.

Returns:
Description:

The Sound Manager instance that was created.

Examples:
Since: 3.0.0
Focus
Focus