The current playback position in seconds. Assign a value to seek to that position.
ReadonlydurationThe total duration of the sound in seconds.
ReadonlyidentifierA unique identifier for this sound object.
ReadonlyisWhether the sound is currently playing.
Whether the sound loops when it reaches the end. Defaults to false.
ReadonlynameThe name of this sound. System sounds loaded by name return their name; file-based sounds return null.
The playback volume, from 0.0 (silent) to 1.0 (full volume).
Stops playback and releases all resources held by this sound.
After calling destroy() the sound object should not be used.
Removes the completion callback previously set with setCallback().
This sound object, for chaining.
Sets a function to be called when playback finishes.
The callback receives two arguments: the sound object and a boolean — true if the
sound completed naturally, false if it was stopped before finishing.
A function called when playback ends.
This sound object, for chaining.
An object representing an audio sound that can be played, paused, and stopped. Create instances using
hs.sound.fromFile()orhs.sound.named().