Fall back to webkitAudioContext if necessary, sigh
This commit is contained in:
parent
4a0ba44116
commit
760ca374ce
@ -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 = {};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user