Skip to content

class Sound (client-side)

Available since version: 0.3.0

Constructor

Sound.new(string file)

Parameters:

  • string file: Sound file path.

Properties

string file

Get or set the sound file path.


number playingTime (read-only)

Return the current playback time.


number volume

Get or set the playback volume.


boolean looping

Get or set whether the sound should loop.


number balance

Get or set the stereo balance (pan).


Methods

play

Start sound playback.

void play()

stop

Stop sound playback.

void stop()

isPlaying

Return whether the sound is currently playing.

boolean isPlaying()

Returns boolean:

True if the sound is playing.


Callbacks

No callbacks.