Events
nodeConnect
nodeConnectis emitted when a new node is connected to the network.nodeConnectis emitted with the following parameters:node- the node that was connected to the network.
nodeDisconnect
nodeDisconnectis emitted when a node is disconnected from the network.nodeDisconnectis emitted with the following parameters:node- the node that was disconnected from the network.reason- the reason the node was disconnected from the network.
nodeReconnect
nodeReconnectis emitted when a node is reconnected to the network.nodeReconnectis emitted with the following parameters:node- the node that was reconnected to the network.
nodeError
nodeErroris emitted when a node encounters an error.nodeErroris emitted with the following parameters:node- the node that encountered the error.error- the error that was encountered.
trackStart
trackStartis emitted when a track starts playing.trackStartis emitted with the following parameters:player- the player that started playing the track.track- the track that started playing.payload- the payload that was sent with the track.
trackEnd
trackEndis emitted when a track ends.trackEndis emitted with the following parameters:player- the player that ended the track.track- the track that ended.payload- the payload that was sent with the track.
trackError
trackErroris emitted when a track encounters an error.trackErroris emitted with the following parameters:player- the player that encountered the error.track- the track that encountered the error.payload- the payload that was sent with the track.
trackStuck
trackStuckis emitted when a track gets stuck.trackStuckis emitted with the following parameters:player- the player that got stuck.track- the track that got stuck.payload- the payload that was sent with the track.
socketClosed
socketClosedis emitted when a socket is closed.socketClosedis emitted with the following parameters:player- the player that closed the socket.payload- the payload that was sent with the socket.
playerCreate
playerCreateis emitted when a player is created.playerCreateis emitted with the following parameters:player- the player that was created.
playerDisconnect
playerDisconnectis emitted when a player is destroyed.playerDisconnectis emitted with the following parameters:player- the player that was destroyed.
playerMove
playerMoveis emitted when a player is moved to a new node.playerMoveis emitted with the following parameters:player- the player that was moved.oldChannel- the node the player was moved from.newChannel- the node the player was moved to.
playerUpdate
playerUpdateis emitted when a player is updated.playerUpdateis emitted with the following parameters:player- the player that was updated.payload- the payload that was sent with the update.
queueEnd
queueEndis emitted when a queue ends.queueEndis emitted with the following parameters:player- the player that ended the queue.
debug
Debug events are used for debugging purposes and should not be used in production.
debugis emitted when a debug message is received.debugis emitted with the following parameters:message- the debug message that was received.