Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Loader
/
Audio
Phaser 4.1.0
Phaser 4 examples
Audio
5
examples
Examples
5
Load Audio
Learn how to load audio files in multiple formats (OGG, MP3, and M4A) for cross-browser compatibility and play them back in your scene.
Load Audio Sprite
This example demonstrates how to load an audio sprite using a JSON configuration file and multiple audio formats, then play specific sound markers defined within the sprite.
Load Audio Sprite Resources
Learn how to load and play audio sprites using a JSON configuration file and its associated audio resources.
Load Audio Stream
Demonstrates how to load and play audio as a stream by setting the stream property, which is useful for playing long music tracks without waiting for the full file to download.
Loading HTML5 Audio
Demonstrates how to load and play audio using the HTML5 Audio tag by disabling the Web Audio API in the game configuration.