open-cogsci/osweb

Sampler gives error when playing too many sounds in Google Chrome

Closed this issue · 0 comments

After a few hundred sounds, the sampler item gives the following error in Google Chrome:

[Intervention] Blocked attempt to create a WebMediaPlayer as there are too many WebMediaPlayers already in existence. See crbug.com/1144736#c27

This appears to be related to the audio context not being freed up after playback. The issue never came up before because only recent versions of Google Chrome complain about it.

let sample = runner._pool['my_sound.ogg'].data
sample.play()