feat: add event listeners for player, sound, and user events in SocketProvider

This commit is contained in:
JSC
2025-07-31 21:34:08 +02:00
parent 7b4dd57f1f
commit d2891f4f2b
2 changed files with 35 additions and 1 deletions

View File

@@ -33,6 +33,9 @@ class EventEmitter {
}
export const authEvents = new EventEmitter()
export const playerEvents = new EventEmitter()
export const soundEvents = new EventEmitter()
export const userEvents = new EventEmitter()
// Auth event types
export const AUTH_EVENTS = {
@@ -40,4 +43,19 @@ export const AUTH_EVENTS = {
TOKEN_EXPIRED: 'token_expired',
LOGIN_SUCCESS: 'login_success',
LOGOUT: 'logout',
} as const
// Player event types
export const PLAYER_EVENTS = {
PLAYER_STATE: 'player_state',
} as const
// Sound event types
export const SOUND_EVENTS = {
SOUND_PLAYED: 'sound_played',
} as const
// User event types
export const USER_EVENTS = {
USER_CREDITS_CHANGED: 'user_credits_changed',
} as const