Stream audio in Phaser v3.60

You can load and play audio as video, more or less. Good for music.

Explanation :woman_tipping_hand:

Since v3.60 Phaser can stream video using the Video Game Object. You can play audio this way also if you create the corresponding audio type on game.device.video with the same value as game.device.audio.mp3 (true on devices supporting MP3 audio):

function preBoot(game) {
  game.device.video.mp3 = game.device.audio.mp3;
}

new Phaser.Game({ callbacks: { preBoot } });
2 Likes