diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-12-08 11:11:57 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-12-08 11:11:57 +1100 |
| commit | ca5d7b867c381b7886a660ce744df0b74f38b2e6 (patch) | |
| tree | 61987a625e63a124c142be3df2c8dde0d9c14613 /src/lua | |
| parent | aaa949f71805e2040c7ee9a4d0a3c260de95a6d0 (diff) | |
| download | tangara-fw-ca5d7b867c381b7886a660ce744df0b74f38b2e6.tar.gz | |
Add shuffle and repeat options for the playback queue
Diffstat (limited to 'src/lua')
| -rw-r--r-- | src/lua/stubs/queue.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lua/stubs/queue.lua b/src/lua/stubs/queue.lua new file mode 100644 index 00000000..000c35d3 --- /dev/null +++ b/src/lua/stubs/queue.lua @@ -0,0 +1,22 @@ +--- Properties and functions for inspecting and manipulating the track playback queue +-- @module queue + +local queue = {} + +--- queue.position returns the index in the queue of the currently playing track. This may be zero if the queue is empty. +-- @treturn types.Property a positive integer property, which is a 1-based index +function queue.position() end + +--- queue.size returns the total number of tracks in the queue, including tracks which have already been played. +-- @treturn types.Property a positive integer property +function queue.size() end + +--- queue.replay determines whether or not the queue will be restarted after the final track is played. +-- @treturn types.Property a writeable boolean property +function queue.replay() end + +--- queue.random determines whether, when progressing to the next track in the queue, the next track will be chosen randomly. The random selection algorithm used is a Miller Shuffle, which guarantees that no repeat selections will be made until every item in the queue has been played. +-- @treturn types.Property a writeable boolean property +function queue.random() end + +return queue
\ No newline at end of file |
