fix(ui): unify titlebar and playback state
- window buttons live in the page header on library/search pages and in a shared chrome strip where a page has no header; removed the 44px root padding toggle that made pages jump on navigation - video player gets its own titlebar row with window controls; the audio player hides the global app bar - starting a video stops music and vice versa; a single track queues the rest of its album, or the artist's songs when AlbumId is missing - album page no longer crashes on albums without AlbumArtists - queue summary is localized
This commit is contained in:
1 parent
d9bce4de04
commit
fcf61012db
13 files changed
+245
-171
No files matched your search
@@ -59,6 +59,21 @@ export const playAudio = (
|
||||
playlistItemId?: string | undefined,
|
||||
startTimeTicks = 0,
|
||||
): void => {
|
||||
// Only one medium at a time: starting music stops video playback.
|
||||
if (typeof document !== "undefined") {
|
||||
const video = (document
|
||||
.querySelector("hls-video")
|
||||
?.shadowRoot?.querySelector("video") ??
|
||||
document.querySelector("video")) as HTMLVideoElement | null;
|
||||
if (video && !video.paused) video.pause();
|
||||
}
|
||||
void import("./playback").then(({ usePlaybackStore }) => {
|
||||
const state = usePlaybackStore.getState();
|
||||
if (state.mediaSource?.id || state.playerState.isPlayerPlaying) {
|
||||
usePlaybackStore.setState(usePlaybackStore.getInitialState());
|
||||
}
|
||||
});
|
||||
|
||||
useAudioPlayback.setState({
|
||||
display: true,
|
||||
url,
|
||||
|
||||
Reference in new issue
Block a user