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

Handlers

These are handlers

Start

exports['mx-surround']:onPlayStart(soundId, fn)

Parameters

  • soundId: string

  • fn: function


Stop

exports['mx-surround']:onPlayEnd(soundId, fn)

Parameters

  • soundId: string

  • fn: function


Pause

exports['mx-surround']:onPlayPause(soundId, fn)

Parameters

  • soundId: string

  • fn: function


Resume

Parameters

  • soundId: string

  • fn: function


Loading

Parameters

  • soundId: string

  • fn: function


Attach

Parameters

  • soundId: string

  • fn: function


Detach

Parameters

  • soundId: string

  • fn: function


Destroy

Parameters

  • soundId: string

  • fn: function

Time Update

This handler is triggered when the current time changed

Parameters

  • soundId: string

  • fn: function


Play Error

Triggered when the sound could not be played on this client: a YouTube error code, a dead link, an unsupported format or a load that timed out.

Parameters

  • soundId: string | number

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


Error

Same moment as onPlayError. fn gets (info, reason).

Parameters

  • soundId: string | number

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


Rate Change

Triggered when the playback rate of the sound changes.

Parameters

  • soundId: string | number

  • fn: function(info: table, rate: number, preservePitch: boolean)


Loop

Triggered each time a looping sound wraps back to the start.

Parameters

  • soundId: string | number

  • fn: function


Directly Set

Parameters

  • soundId: string

  • data: table

    • destroy: function

    • start: function

    • stop: function

    • pause: function

    • resume: function

    • loading: function

    • attach: function

    • detach: function

    • timeupdate: function

    • end: function

    • loop: function

    • error: function

    • playError: function

    • rate: function

Last updated