Skip to content

Conversation

aaron13100
Copy link

Checklist

Feel free to reject this or change it. It's untested as I can't get the project to build/compile. On my JavaScript version I had to separate out the initialization of audioContext in order for the sound to work on the first firework, like this.

  init() {
    if (this.audioContext == null) {
      this.audioContext = new (window.AudioContext || window.webkitAudioContext)();
      this.loadSounds();
    }
    if (!this.onInit && this.isEnabled) {
      this.onInit = true;
    }
  }

but it looks like what I committed in typescript will work.

note that this is too late for the first firework and .init() must be called earlier if the sound for the first firework is to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant