pinball icon indicating copy to clipboard operation
pinball copied to clipboard

Sound effects reach Chrome's WebMediaPlayer cap

Open Skylled opened this issue 3 years ago • 2 comments

Each time a sound effect is played, a new WebMediaPlayer is created, then suspended but never destroyed. This can be seen in chrome://media-internals by pressing the flippers a few times and looking at new entries.

Chrome has a hard cap of 1000 simultaneous WebMediaPlayers, which can easily be reached over a particularly chaotic game of pinball if each sound effect gets its own player.

Once that cap is reached, the game's audio ceases which seems to ultimately result in the game freezing altogether.

Unfortunately, the issue traces pretty far back, past Flame, to a bug in the underlying audio player bluefireteam/audioplayers#966 in which the plugin does not dispose of players.

Skylled avatar May 11 '22 05:05 Skylled

Related Stack Overflow question: https://stackoverflow.com/questions/68480528/blocked-attempt-to-create-a-webmediaplayer-as-there-are-too-many-webmediaplayers

Skylled avatar May 11 '22 05:05 Skylled

@Skylled thanks for the issue. Indeed seems to be an audio player issue. I believe solving this would solve #465 and #466 .

alestiago avatar May 12 '22 22:05 alestiago