From 93821a277640a6c8b56cbfbf505f3adab62768df Mon Sep 17 00:00:00 2001 From: Binary Alley Date: Sun, 18 Oct 2026 21:44:55 +0300 Subject: [PATCH] Implements player queue engine --- docs/technical/theming/Theming.md | 19 +- .../Core/Themes/Bundled/editorial-paper.zip | Bin 375101 -> 375454 bytes .../Core/Themes/Bundled/lumina-default.zip | Bin 374564 -> 374917 bytes .../Resources/Views/Shared/_Layout.ar-SA.resx | 36 + .../Resources/Views/Shared/_Layout.de-DE.resx | 36 + .../Resources/Views/Shared/_Layout.en-US.resx | 36 + .../Resources/Views/Shared/_Layout.es-ES.resx | 36 + .../Resources/Views/Shared/_Layout.fr-FR.resx | 36 + .../Resources/Views/Shared/_Layout.it-IT.resx | 36 + .../Resources/Views/Shared/_Layout.ja-JP.resx | 36 + .../Core/Resources/Views/Shared/_Layout.resx | 36 + .../Resources/Views/Shared/_Layout.ro-RO.resx | 36 + .../Resources/Views/Shared/_Layout.uk-UA.resx | 36 + .../Resources/Views/Shared/_Layout.zh-CN.resx | 36 + .../Core/Themes/ThemeAudioPlayerBuilder.cs | 14 +- .../Core/Views/Shared/_AudioPlayer.cshtml | 61 +- .../Views/Shared/_ThemeLayoutScripts.cshtml | 21 +- .../wwwroot/css/site.css | 147 +- .../js/audio-player/audio-player-engine.js | 5 +- .../js/audio-player/audio-player-errors.js | 4 +- .../js/audio-player/audio-player-events.js | 18 +- .../js/audio-player/audio-player-manifest.js | 24 +- .../audio-player-pipeline-engine.js | 34 + .../js/audio-player/audio-player-queue.js | 1719 ++++++++++++++++ .../js/audio-player/audio-player-render.js | 2 +- .../js/audio-player/audio-player-utils.js | 22 + .../wwwroot/js/audio-player/audio-player.js | 1814 +++++++++++++++-- 27 files changed, 4114 insertions(+), 186 deletions(-) create mode 100644 src/Lumina.Presentation.Web/wwwroot/js/audio-player/audio-player-queue.js diff --git a/docs/technical/theming/Theming.md b/docs/technical/theming/Theming.md index 54df94a4..5122a2a7 100644 --- a/docs/technical/theming/Theming.md +++ b/docs/technical/theming/Theming.md @@ -229,7 +229,7 @@ The rendered page content, navigation and scripts are inserted unescaped with `{ ### The Audio Player Bar -Every authenticated page renders the audio player bar through the `audioPlayer` field of the layout model. The bar is hidden until the user starts playback of a track, album or artist, and the global audio player script shows it, expands it and hides it again. The markup comes from the `shared/audio-player` template of the active theme; when the theme does not provide that template, the application renders its own fallback markup, so the player always has a bar to bind to. +Every authenticated page renders the audio player bar through the `audioPlayer` field of the layout model. The bar starts hidden, and the global audio player script shows it when playback starts, expands it and hides it again. The markup comes from the `shared/audio-player` template of the active theme; when the theme does not provide that template, the application renders its own fallback markup, so the player always has a bar to bind to. The bar is fixed to the bottom of the viewport, so the theme owns the room reserved for it on the main content element. A layout must keep these element hooks, which the audio player drives (the two id controls are bound by the global site script, which routes them to the audio player): @@ -251,7 +251,7 @@ The `shared/audio-player` template receives the following model: | `assetBase` | The base URL of the theme assets, used by the theme template to reference its own assets. | | `queueItemTemplate` | The raw source of the `shared/audio-player/queue-item` sub template, inlined by the application into a plain text script element. | | `playlistItemTemplate` | The raw source of the `shared/audio-player/playlist-item` sub template, inlined by the application into a plain text script element. | -| `strings` | The localized strings of the bar, keyed by their resource names. A shell template uses `toggleFullHeight` and `toggleVisibility` for its two controls; the player reads the play, pause, mute, unmute, volume, seek and buffering labels from the global scripts configuration instead, so a themed shell does not need to render them. | +| `strings` | The localized strings of the bar, keyed by their resource names. A shell template uses `toggleFullHeight`, `toggleVisibility`, `previous`, `next`, `shuffle`, `shuffleOff`, `shuffleRelease`, `shuffleArtist`, `shuffleLibrary`, `repeat`, `repeatOff`, `repeatAll`, `repeatOne` and `queue` for its controls; the player reads the play, pause, mute, unmute, volume, seek and buffering labels from the global scripts configuration instead, so a themed shell does not need to render them. | A theme must reserve the space for the bar itself, as the bundled themes do: @@ -272,11 +272,18 @@ main.audio-player-full-height { The application fallback layout, which renders when the active theme cannot be loaded, reserves the room itself, because the application stylesheet does not position the content area of a theme. A theme that omits the rules above leaves the fixed bar overlapping the bottom of the page. -The markup inside the bar exposes the hook attributes the audio player script binds. A theme that replaces the bar markup must keep all of them; the part of the bar whose hook is missing stays inert. The play affordances of the pages use the `data-audio-player-play` trigger attribute. +The markup inside the bar exposes the hook attributes the audio player script binds. A theme that replaces the bar markup must keep all of them; the part of the bar whose hook is missing stays inert. The play affordances of the pages use the `data-audio-player-play` trigger attribute, and a play next affordance uses `data-audio-player-play-next`; both read the same descriptor attributes. A track trigger must supply `libraryId`, `trackId`, `albumId` and `artistId`, because the playback manifest route needs all four Ids. An album context trigger supplies `libraryId`, `albumId` and `artistId`, and an artist context trigger supplies `libraryId` and `artistId`. The deprecated `queuechange` event keeps its ordered descriptor array payload for older theme scripts; new code must use `queuestatechange`, whose payload is the compact queue summary. | Hook attribute | Meaning | | --- | --- | | `data-audio-player-play-pause` | The play and pause control. The player adds the `is-playing` class to it while a track plays. | +| `data-audio-player-previous` | The previous control. It either returns to the previous queue entry or restarts the current track, following the navigation history. | +| `data-audio-player-next` | The next control. It starts the next queue entry and loads another shuffle or autoplay batch when the queue is at its end. The player sets `disabled` and the `is-disabled` class when there is no next entry. | +| `data-audio-player-shuffle-control` | The wrapper of the shuffle toggle and its scope menu, so the player can position the menu and close it on an outside click. The player adds `is-menu-open` to the bar container while the menu is open, so a theme can let the menu overflow the bar. | +| `data-audio-player-shuffle` | The shuffle menu button when a scope menu is present: clicking it always opens the menu, the player sets `aria-haspopup="menu"`, `aria-expanded`, and the `is-active` class while shuffle is on, and it does not set `aria-pressed`. Without a scope menu the control is a plain toggle that exposes `aria-pressed` instead. | +| `data-audio-player-shuffle-menu` | The shuffle scope menu, hidden with the `hidden` attribute while it is closed. | +| `data-audio-player-shuffle-scope` | A scope item inside the menu, with the value `off`, `release`, `artist` or `library`. The player toggles `aria-checked` and the `is-selected` class on it; the `off` item is selected while shuffle is off. A scope whose required Ids cannot be resolved from the current queue is disabled with `disabled`, `aria-disabled="true"` and the `is-disabled` class. | +| `data-audio-player-repeat` | The repeat toggle. The player writes `data-audio-player-repeat-mode` (`off`, `all` or `one`), toggles `aria-pressed`, the `is-active` class and, for one, the `is-one` class. | | `data-audio-player-progress` | The progress bar, a `role="slider"` element with `tabindex="0"` that the player scrubs and whose ARIA value attributes it writes. It carries `data-audio-player-progress-state` (`idle`, `ready` or `buffering`) and the `is-buffering` class while it loads. | | `data-audio-player-progress-played` | The played layer of the bar. The player publishes its start and width as the custom properties `--audio-player-progress-played-start` and `--audio-player-progress-played-width`. | | `data-audio-player-progress-downloaded` | The downloaded but not played layer. `--audio-player-progress-downloaded-start` and `--audio-player-progress-downloaded-width`. | @@ -288,7 +295,7 @@ The markup inside the bar exposes the hook attributes the audio player script bi | `data-audio-player-volume` | The volume slider, a `role="slider"` element with `tabindex="0"` that the player scrubs and whose ARIA value attributes it writes. The fill is published as `--audio-player-volume-start` and `--audio-player-volume-width`. | | `data-audio-player-volume-level` | The volume fill. It carries no geometry of its own: the stylesheet drives it from the custom properties above. | | `data-audio-player-mute` | The mute toggle. The player toggles the `is-muted` class and the `aria-pressed` state on it. | -| `data-audio-player-queue` | The queue list of the expanded bar. | +| `data-audio-player-queue` | The queue list of the expanded bar. The player writes `data-audio-player-queue-entry-id` on every rendered item root, whether it comes from the theme sub template or from the built-in markup, and makes the root focusable, so clicking an item or pressing Enter or Space on it starts that entry. | Each progress layer also carries `data-audio-player-progress-layer` (`played`, `downloaded` or `undownloaded`) in the markup, so a theme can select a layer by its state as well as by its class. The player writes no inline geometry on any of the bar elements: it publishes the geometry of each state as the custom properties above, which the application stylesheet consumes, so a theme restyles or reorients either bar by consuming the same properties. @@ -305,11 +312,13 @@ The sub templates are rendered client side by the audio player script with the s | Template | Fields | | --- | --- | -| `queue-item` | `index` (the one based position in the queue), `trackId`, `albumId`, `artistId`, `libraryId`, `title`, `duration` (the formatted `m:ss` duration), `durationSeconds`, `coverArtUrl`, `isCurrent`, `isPlayed` and `isLast`. The item root must keep the `audio-player-queue-item` class, the stylesheet hook of a queue item: the player appends the rendered element as-is, so the class is what lets the theme style it. | +| `queue-item` | `entryId` (the identity of this occurrence in the queue), `index` (the one based position in the queue), `trackId`, `albumId`, `artistId`, `libraryId`, `title`, `duration` (the formatted `m:ss` duration), `durationSeconds`, `coverArtUrl`, `isCurrent`, `isPlayed`, `isLast`, `isContinuation` (the entry was added by the autoplay continuation) and `isShuffled` (the entry was added by a shuffle batch). The item root must keep the `audio-player-queue-item` class, the stylesheet hook of a queue item: the player appends the rendered element as-is, so the class is what lets the theme style it. The built-in item also adds `is-current`, `is-played`, `is-continuation` and `is-shuffled` to the root. The player writes `data-audio-player-queue-entry-id` on the root itself, so a theme item does not need to render the identity. | | `playlist-item` | `index`, `trackId`, `albumId`, `artistId`, `libraryId`, `title`, `duration`, `durationSeconds`, `coverArtUrl` and `isCurrent`. The item root must keep the `audio-player-playlist-item` class, the stylesheet hook of a playlist item. Saved playlists do not exist yet, so the shell inlines this sub template for theme authors, but nothing renders it yet; the playlist feature renders the entries of a playlist from it. | A theme can omit either sub template: the player then renders that part with its own built-in markup. When a theme replaces the shell, it must keep the two plain text script element ids above, the element hooks of the bar, and the `audio-player-container`, `not-shown` and `full-height` classes the player toggles. +Every field of the `queue-item` and `playlist-item` models is untrusted: titles and identifiers come from file metadata and the music endpoints. Render these fields with the escaped form, `{{field}}`. The template engine also supports the unescaped form `{{{field}}}`, but these models contain no trusted HTML, so unescaped tags must not be used for them. Escaping does not neutralise whitespace in an unquoted attribute, so every model value placed in an attribute must sit inside quoted attribute marks, for example `data-track-id="{{trackId}}"` and never `data-track-id={{trackId}}`. + ### The Navigation Template (shared/nav-menu) The navigation template renders the menu of the active theme. Its model contains the site name and two menu structures, one for the mobile menu and one for the desktop menu bar: diff --git a/src/Lumina.Presentation.Api/Core/Themes/Bundled/editorial-paper.zip b/src/Lumina.Presentation.Api/Core/Themes/Bundled/editorial-paper.zip index 28b833d95508816807bb119bff852568d01e5e4b..0888cd02fb3e6464e0219b5b9a62fd1cd3337096 100644 GIT binary patch delta 3211 zcmZ9Pc_7s3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6u5?9EGlRFGI9bF5-B;cj9f-0kAk>dOcCCfk-=pyP)f8A zV}o}&sid`w6)U(}j!fypFj0<L&Kfq*tT0W){71)zcBicnKY&QPBs zK6hpLO8+#?uSC{Zk<}deQzbH?KLg_`v;({6GpA#n56*zARb)2O2Pj$YJTk*7lf~eT zUE+$L%i!91WQwKLi-7}Ub+`hkR+B!X!<6DajLS+k9UQJE=NaEbh_{Oh2&&25ws13q z*P{h6EQa--6clbDWWlC}j6qJVr2B*?AtRnCHk{f@%&pIL8)eW|L*@{+oq|p;LJ`z! zN&h$>O6m6|bb`UIh%_qaI@S7KQ#E&v?^&?n0b!4E9AWE>ULpIos z-4vwPkqh3kkAl8B@?Z}g_zWztt4FJ`j>BSQ1C|;|_52p`cP6ju$xM`^a)f9D9vDqP z?YG1t@ioGRa3NBsk3p&sInXDdTZn8~rY8wnU_?Z4WW?%-kjP*#&LuxT%F^d0y*C5g zFQ9c;Y$l{%KsNXhE&**oXu-$@vVykDpw@uw@a9$m{{4Y4f-?=s3Xd9+kR{ACAXD7z zFA3QJuYpYCu`ZfB)jT~YZbbVqoV=JC$B zUrql%xnxT*2F69m2*#Tb0exa`o8w^DjI`lcG*Y6x=e<$pc{5IkZH*zn0Wra{iQHJP zP9PXOgLEOL39ZKWrAbH+o}|nMgWpLjY نعم + + المقطع السابق + + + المقطع التالي + + + تشغيل عشوائي + + + تشغيل الألبوم عشوائياً + + + تشغيل الفنان عشوائياً + + + تشغيل المكتبة عشوائياً + + + تكرار + + + التكرار متوقف + + + تكرار الكل + + + تكرار مقطع واحد + + + قائمة التشغيل + + + تشغيل عشوائي متوقف + diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.de-DE.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.de-DE.resx index 66d2225f..2f81b8b7 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.de-DE.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.de-DE.resx @@ -180,4 +180,40 @@ Ja + + Vorheriger Titel + + + Nächster Titel + + + Zufallswiedergabe + + + Release zufällig abspielen + + + Interpret zufällig abspielen + + + Bibliothek zufällig abspielen + + + Wiederholen + + + Wiederholung aus + + + Alle wiederholen + + + Titel wiederholen + + + Warteschlange + + + Zufallswiedergabe aus + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.en-US.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.en-US.resx index 8af1c8e3..ce26252c 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.en-US.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.en-US.resx @@ -180,4 +180,40 @@ Yes + + Previous track + + + Next track + + + Shuffle + + + Shuffle release + + + Shuffle artist + + + Shuffle library + + + Repeat + + + Repeat off + + + Repeat all + + + Repeat one + + + Play queue + + + Shuffle off + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.es-ES.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.es-ES.resx index aa48670f..b4ca5eb8 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.es-ES.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.es-ES.resx @@ -180,4 +180,40 @@ Sí + + Pista anterior + + + Pista siguiente + + + Reproducción aleatoria + + + Aleatorio por álbum + + + Aleatorio por artista + + + Aleatorio por biblioteca + + + Repetir + + + Repetición desactivada + + + Repetir todo + + + Repetir pista + + + Cola de reproducción + + + Reproducción aleatoria desactivada + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.fr-FR.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.fr-FR.resx index 89f415cd..6c76035b 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.fr-FR.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.fr-FR.resx @@ -180,4 +180,40 @@ Oui + + Piste précédente + + + Piste suivante + + + Lecture aléatoire + + + Aléatoire sur la sortie + + + Aléatoire sur l’artiste + + + Aléatoire sur la bibliothèque + + + Répéter + + + Répétition désactivée + + + Tout répéter + + + Répéter la piste + + + File de lecture + + + Lecture aléatoire désactivée + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.it-IT.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.it-IT.resx index 96e4c685..b743bc30 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.it-IT.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.it-IT.resx @@ -180,4 +180,40 @@ Sì + + Brano precedente + + + Brano successivo + + + Riproduzione casuale + + + Casuale per album + + + Casuale per artista + + + Casuale per libreria + + + Ripeti + + + Ripetizione disattivata + + + Ripeti tutto + + + Ripeti brano + + + Coda di riproduzione + + + Riproduzione casuale disattivata + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ja-JP.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ja-JP.resx index 498740a1..301beb9a 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ja-JP.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ja-JP.resx @@ -180,4 +180,40 @@ はい + + 前の曲 + + + 次の曲 + + + シャッフル + + + アルバムをシャッフル + + + アーティストをシャッフル + + + ライブラリをシャッフル + + + リピート + + + リピートなし + + + すべてリピート + + + 1曲リピート + + + 再生キュー + + + シャッフルなし + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.resx index 8af1c8e3..ce26252c 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.resx @@ -180,4 +180,40 @@ Yes + + Previous track + + + Next track + + + Shuffle + + + Shuffle release + + + Shuffle artist + + + Shuffle library + + + Repeat + + + Repeat off + + + Repeat all + + + Repeat one + + + Play queue + + + Shuffle off + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ro-RO.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ro-RO.resx index cc6f9de6..6fe040f3 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ro-RO.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.ro-RO.resx @@ -180,4 +180,40 @@ Da + + Piesa anterioară + + + Piesa următoare + + + Redare aleatorie + + + Aleatoriu pe album + + + Aleatoriu pe artist + + + Aleatoriu pe bibliotecă + + + Repetă + + + Repetare oprită + + + Repetă tot + + + Repetă piesa + + + Coada de redare + + + Redare aleatorie oprită + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.uk-UA.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.uk-UA.resx index 847d6304..747b667d 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.uk-UA.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.uk-UA.resx @@ -180,4 +180,40 @@ Так + + Попередній трек + + + Наступний трек + + + Перемішати + + + Перемішати альбом + + + Перемішати виконавця + + + Перемішати бібліотеку + + + Повтор + + + Повтор вимкнено + + + Повторити все + + + Повторити трек + + + Черга відтворення + + + Перемішування вимкнено + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.zh-CN.resx b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.zh-CN.resx index 49547c28..63ae135a 100644 --- a/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.zh-CN.resx +++ b/src/Lumina.Presentation.Web/Core/Resources/Views/Shared/_Layout.zh-CN.resx @@ -180,4 +180,40 @@ 是 + + 上一首 + + + 下一首 + + + 随机播放 + + + 随机播放专辑 + + + 随机播放艺术家 + + + 随机播放音乐库 + + + 循环播放 + + + 不循环 + + + 列表循环 + + + 单曲循环 + + + 播放队列 + + + 关闭随机播放 + \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Core/Themes/ThemeAudioPlayerBuilder.cs b/src/Lumina.Presentation.Web/Core/Themes/ThemeAudioPlayerBuilder.cs index 6f00a28f..5abe0da3 100644 --- a/src/Lumina.Presentation.Web/Core/Themes/ThemeAudioPlayerBuilder.cs +++ b/src/Lumina.Presentation.Web/Core/Themes/ThemeAudioPlayerBuilder.cs @@ -42,7 +42,19 @@ public sealed class ThemeAudioPlayerBuilder Dictionary strings = new() { ["toggleFullHeight"] = Localize("ToggleFullHeight"), - ["toggleVisibility"] = Localize("ToggleVisibility") + ["toggleVisibility"] = Localize("ToggleVisibility"), + ["previous"] = Localize("AudioPlayerPrevious"), + ["next"] = Localize("AudioPlayerNext"), + ["shuffle"] = Localize("AudioPlayerShuffle"), + ["shuffleOff"] = Localize("AudioPlayerShuffleOff"), + ["shuffleRelease"] = Localize("AudioPlayerShuffleRelease"), + ["shuffleArtist"] = Localize("AudioPlayerShuffleArtist"), + ["shuffleLibrary"] = Localize("AudioPlayerShuffleLibrary"), + ["repeat"] = Localize("AudioPlayerRepeat"), + ["repeatOff"] = Localize("AudioPlayerRepeatOff"), + ["repeatAll"] = Localize("AudioPlayerRepeatAll"), + ["repeatOne"] = Localize("AudioPlayerRepeatOne"), + ["queue"] = Localize("AudioPlayerQueue") }; return new ThemeAudioPlayerDto( diff --git a/src/Lumina.Presentation.Web/Core/Views/Shared/_AudioPlayer.cshtml b/src/Lumina.Presentation.Web/Core/Views/Shared/_AudioPlayer.cshtml index 3fb2d034..f2e864f0 100644 --- a/src/Lumina.Presentation.Web/Core/Views/Shared/_AudioPlayer.cshtml +++ b/src/Lumina.Presentation.Web/Core/Views/Shared/_AudioPlayer.cshtml @@ -27,11 +27,20 @@ while it is expanded. The audio player toggles both classes on it as well. - The elements with the ids 'audio-player-full-height-toggle' and 'audio-player-close', which the global site script binds and routes to the audio player. - - The hook attributes the audio player binds: 'data-audio-player-play-pause', '-progress', '-progress-played', - '-progress-downloaded', '-progress-undownloaded', '-current-time', '-total-time', '-track-name', - '-cover-thumbnail', '-cover-image', '-volume', '-volume-level', '-mute' and '-queue'. The volume fill element - ('-volume-level') is a styling hook the stylesheet drives from the custom properties below, not one the script - writes to. + - The hook attributes the audio player binds: 'data-audio-player-play-pause', '-previous', '-next', '-shuffle', + '-shuffle-control', '-shuffle-menu', '-repeat', '-progress', '-progress-played', '-progress-downloaded', + '-progress-undownloaded', '-current-time', '-total-time', '-track-name', '-cover-thumbnail', '-cover-image', + '-volume', '-volume-level', '-mute' and '-queue'. The volume fill element ('-volume-level') is a styling hook the + stylesheet drives from the custom properties below, not one the script writes to. + - The shuffle scope items carry 'data-audio-player-shuffle-scope' ('off', 'release', 'artist' or 'library'), inside + the menu element carrying 'data-audio-player-shuffle-menu'. The shuffle control carries 'data-audio-player-shuffle' + and is wrapped by 'data-audio-player-shuffle-control', so the player can open the menu near it and close it on an + outside click. It is a menu button: it carries 'aria-haspopup' and 'aria-expanded', gets the 'is-active' class while + shuffle is on, and does not carry 'aria-pressed'. The scope items get 'aria-checked' and the 'is-selected' class, and + the 'off' item is selected while shuffle is off. The repeat toggle carries 'data-audio-player-repeat' and the player + writes 'data-audio-player-repeat-mode' ('off', 'all' or 'one') and toggles the 'is-active' and 'is-one' classes on it. + A queue item root rendered by the player always carries 'data-audio-player-queue-entry-id', whether it comes from the + theme sub template or from the built-in markup, so clicking it starts that entry. - The three state progress bar: the played part carries 'audio-player-progress-played', the downloaded but not played part carries 'audio-player-progress-downloaded', and the not yet downloaded part carries 'audio-player-progress-undownloaded'. Each layer also carries 'data-audio-player-progress-layer' ('played', @@ -43,19 +52,22 @@ geometry, so a theme consumes the properties to style each state and to give either bar its own shape and orientation. The player marks the bar with 'is-buffering' while it is loading, and carries the state in 'data-audio-player-progress-state' ('idle', 'ready' or 'buffering') together with the slider ARIA attributes. - - The plain text script elements that carry the raw source of the 'shared/audio-player/queue-item' and - 'shared/audio-player/playlist-item' sub templates, with the ids 'audio-player-template-queue-item' and - 'audio-player-template-playlist-item'. + - Themed shells only: the plain text script elements that carry the raw source of the + 'shared/audio-player/queue-item' and 'shared/audio-player/playlist-item' sub templates, with the ids + 'audio-player-template-queue-item' and 'audio-player-template-playlist-item'. This application fallback partial + renders neither element; it intentionally uses the built-in queue item markup. - The play affordances the pages hand to the player use the 'data-audio-player-play' trigger attribute. The - 'The Audio Player Bar' section of docs/technical/theming/Theming.md documents this contract for theme authors. + The play affordances the pages hand to the player use the 'data-audio-player-play' trigger attribute, and a play next + affordance uses 'data-audio-player-play-next'. A track trigger must carry libraryId, trackId, albumId and artistId, + because the playback manifest route needs all four Ids. The 'The Audio Player Bar' section of + docs/technical/theming/Theming.md documents this contract for theme authors. *@