diff options
| author | julian laplace <julescarbon@gmail.com> | 2022-10-27 22:36:20 +0200 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2022-10-27 22:36:20 +0200 |
| commit | 61b119ecbddf2275f39a91fa252e071c4767d863 (patch) | |
| tree | 106e02593edaf66865fc5f3a0924a2f8abccb3d5 /public/assets/js/lib/views/stream/hootstream.js | |
| parent | eea34be30711fc9de9a65dce772b0f8b42541f9c (diff) | |
play music button
Diffstat (limited to 'public/assets/js/lib/views/stream/hootstream.js')
| -rw-r--r-- | public/assets/js/lib/views/stream/hootstream.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index 905f0e7..94d1cb3 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -80,6 +80,13 @@ var HootStream = View.extend({ // $.get(`/api/stream?thread=${thread}`).then((response) => { console.log(response); + audio.index( + response.files + .map((file) => [file.filename.toLowerCase(), file]) + .sort((a, b) => a[0].localeCompare(b[0])) + .map(([, file]) => file) + ); + audio.play(0); }); }, |
