Skip to content
Toddyn edited this page Dec 2, 2024 · 1 revision

This the events area of AquaLink (wow so cool)

trackStart - Starts when playing

  • player - the player that started playing the track.
  • track - the track that started playing.
  • payload - the payload that was sent with the track.

trackChange

Triggered when the currently playing track changes.

Parameters:

  • player: The player that changed the track.
  • newTrack: The track that has started playing after the change.
  • previousTrack: The track that was playing before the change.

trackEnd

Fired when a track finishes playing.

Parameters:

  • player: The player whose track has ended.
  • track: The track that has ended.
  • payload: The payload associated with the end of the track, if any (e.g., duration, stop reason).

trackError

Triggered when there is an error during track playback.

Parameters:

  • player: The player that encountered the error.
  • track: The track that was playing when the error occurred.
  • error: A description of the error that occurred.

trackStuck

Fired when a track becomes unresponsive (stuck) during playback.

Parameters:

  • player: The player whose track is stuck.
  • track: The track that is stuck.

socketClosed

Indicates that a socket connection has been closed.

Parameters:

  • player: The player associated with the socket connection.
  • reason: The reason for the socket closure (e.g., user action, timeout).

debug

A general-purpose event for debug messages.

Parameters:

  • message: The debug message being logged.

playerLeave

Triggered when a player leaves the session.

Parameters:

  • player: The player that has left.
  • sessionId: The ID of the session from which the player has left.

playerDestroy

Fired when a player is completely removed from the system.

Parameters:

  • player: The player that has been destroyed.
  • reason: The reason for the player destruction.

playerMove

Indicates that a player has changed their position within the system (e.g., moved to a different queue or playlist).

Parameters:

  • player: The player who has moved.
  • previousPosition: The player's previous position.
  • newPosition: The player's new position.

nodeError

Triggered when an error occurs at the node level.

Parameters:

  • node: The ID of the node where the error occurred.
  • error: A description of the error.

nodeConnect

Fired when a node successfully connects to the system.

Parameters:

  • node: The ID of the node that has connected.

nodeDisconnect

Triggered when a node disconnects from the system.

Parameters:

  • node: The ID of the node that has disconnected.
  • reason: The reason for the disconnection.

nodeReconnect

Fired when a node reconnects to the system after a disconnection.

Parameters:

  • node: The ID of the node that has reconnected.

nodeDestroy

Indicates that a node has been completely removed from the system.

Parameters:

  • node: The ID of the node that has been destroyed.
  • reason: The reason for the node destruction.