Listeners
Game flow
/** Action to take when an external source requests to stop autoplay. */
ETHEREAL.onRequestStopAutoplay(() => { /** Your code **/ });
/** Action to take when there is a request to pause the game. */
ETHEREAL.onRequestPauseGame(() => { /** Your code **/ });
/** Action to take when there is a request to resume the game. */
ETHEREAL.onRequestResumeGame(() => { /** Your code **/ });
/** Action to take when there is a connection issue, and it is trying to reconnect. */
ETHEREAL.onConnectionProblem(() => { /** Your code **/ });
/** Action to take when the connection issue is resolved. */
ETHEREAL.onConnectionProblemSolved(() => { /** Your code **/ });
/** Request the game to abort the current play, as there was an error on the server */
ETHEREAL.onRequestAbortPlay(callback: () => void): void;
UI
/** Action to take when an external source requests to show the paytable. */
ETHEREAL.onRequestShowPaytable(() => { /** Your code **/ });
/** Action to take when an external source requests to show the game info/help/game rules. */
ETHEREAL.onRequestShowGameInfo(() => { /** Your code **/ });
/** Action to take when an external source requests to show the settings. */
ETHEREAL.onRequestShowSettings(() => { /** Your code **/ });
Functionality
/** Action to take when an external source requests to update the balance. */
ETHEREAL.onRequestUpdateBalance((balance: number) => { /** Your code **/ });
/** Action to take when an external source requests to enable/disable the audio. */
ETHEREAL.onRequestAudioChange((isEnabled: boolean, audio?: string) => { /** Your code **/ });
/** Action to take when an external source requests to change the language of the game */
ETHEREAL.onRequestLanguageChange((value: string) => { /** Your code **/ });
/** Action to take when an external source requests to change username of the player */
ETHEREAL.onRequestUsernameChange((value: string) => { /** Your code **/ });