Audio interface

Methods for controlling audio.

Methods

isEnabled(): boolean
Determines if game sound should be audible at this instant. Required

subscribe(callback: (isEnabled: boolean) => void): void
Subscribes to changes to isEnabled.

Requirements

  • Your game should not show an overall mute button and should instead rely on the GameSnacks platform control for this.
  • Your game may have separate granular audio controls in the game, such as for background music or sound effects, but it must still follow these requirements.