Fall back to webkitAudioContext if necessary, sigh

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-26 19:47:51 -06:00
parent 4a0ba44116
commit 760ca374ce

View File

@ -215,7 +215,7 @@ const OBITUARIES = {
// Helper class used to let the game play sounds without knowing too much about the Player // Helper class used to let the game play sounds without knowing too much about the Player
class SFXPlayer { class SFXPlayer {
constructor() { constructor() {
this.ctx = new window.AudioContext; this.ctx = new (window.AudioContext || window.webkitAudioContext); // come the fuck on, safari
this.player_x = null; this.player_x = null;
this.player_y = null; this.player_y = null;
this.sounds = {}; this.sounds = {};