feat: add event listeners for player, sound, and user events in SocketProvider
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user