For the complete documentation index, see llms.txt. This page is also available as Markdown.

Handlers

These are handlers

Play Error

exports['mx-surround']:onPlayError(soundId, function(info, reason)
    -- skip to the next track for everyone
end)

Triggered once per track when the track itself is broken, not just one player's copy of it:

  • No player could start it at all, or

  • Half of the players in range report it failing while it plays

One region-locked player in a full room will not trigger it. You can register it before Play, so a track that never starts is caught too.

reason is the error the client reported: a YouTube error code and what it means, a media error, or a timeout.

Parameters

  • soundId: string | number

  • fn: function(info: table, reason: string)


Error

exports['mx-surround']:onError(soundId, function(info, reason) end)

Triggered every time a single player could not play a synced sound. info.lastError holds { player, reason }.

Parameters

  • soundId: string | number

  • fn: function(info: table, reason: string)


Play End

Parameters

  • soundId: string | number

  • fn: function


Destroy

Parameters

  • soundId: string | number

  • fn: function

Last updated