From a1af85dd72a7d61d687db92db1eb698c9e10ce82 Mon Sep 17 00:00:00 2001 From: 1xDed Date: Fri, 27 Nov 2026 15:12:36 +0300 Subject: [PATCH] feat: unify remote control into a Spotify-like media bar - one bottom bar for local playback and remote devices, replacing the separate remote strip - minimal layout from the reference: cover/title/more, transport, seek times, queue/devices/volume/expand; extra actions in the overflow and device menus - selecting a device transfers playback (local<->remote) with position/queue - remote mode drives the session via playstate commands; local keeps shuffle/repeat/volume/queue --- .../playback/audioPlayer/audioPlayer.scss | 198 ++++++ .../audioPlayer/components/DeviceMenu.tsx | 118 ++++ src/components/playback/audioPlayer/index.tsx | 564 +++++++++++++++--- src/components/remotePlaybackBar/index.tsx | 139 ----- .../remotePlaybackBar/remotePlaybackBar.scss | 42 -- src/routes/__root.tsx | 2 - 6 files changed, 784 insertions(+), 279 deletions(-) create mode 100644 src/components/playback/audioPlayer/components/DeviceMenu.tsx delete mode 100644 src/components/remotePlaybackBar/index.tsx delete mode 100644 src/components/remotePlaybackBar/remotePlaybackBar.scss diff --git a/src/components/playback/audioPlayer/audioPlayer.scss b/src/components/playback/audioPlayer/audioPlayer.scss index 0b3a1eb..8847707 100644 --- a/src/components/playback/audioPlayer/audioPlayer.scss +++ b/src/components/playback/audioPlayer/audioPlayer.scss @@ -226,3 +226,201 @@ $art-size: 48px; } } } + +/* Unified, minimal media bar (local playback + remote device control). */ +.audio-player { + display: flex; + align-items: center; + width: min(1440px, calc(100% - 1.5rem)); + height: 84px; + gap: 1.25rem; + padding: 0 4.5rem 0 0.9rem; // keep the last controls clear of the palm easter egg + background: #0b0c12; + border: 1px solid rgb(255 255 255 / 0.08); + border-radius: 16px; + + .media-bar { + &-left { + display: flex; + align-items: center; + gap: 0.75rem; + width: 30%; + min-width: 220px; + max-width: 360px; + } + + &-cover { + width: 52px; + height: 52px; + flex: 0 0 52px; + padding: 0; + border: 0; + border-radius: 6px; + overflow: hidden; + background: rgb(255 255 255 / 0.06); + color: rgb(255 255 255 / 0.5); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + + img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + } + + &-info { + display: flex; + flex-direction: column; + min-width: 0; + flex: 1; + } + + &-title { + font-weight: 600 !important; + line-height: 1.2 !important; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; + &:hover { + text-decoration: underline; + } + } + + &-subtitle { + opacity: 0.55; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &-more { + flex-shrink: 0; + color: rgb(255 255 255 / 0.6); + } + + &-center { + display: flex; + align-items: center; + gap: 1.25rem; + flex: 1; + min-width: 0; + } + + &-controls { + display: flex; + align-items: center; + gap: 0.15rem; + flex-shrink: 0; + + .MuiIconButton-root { + color: rgb(255 255 255 / 0.7); + transition: color 0.15s ease, transform 0.15s ease; + &:hover { + color: #fff; + background: rgb(255 255 255 / 0.06); + } + &.active { + color: #7cc7ff; + } + .material-symbols-rounded { + font-size: 1.25rem; + } + } + } + + &-play { + width: 42px !important; + height: 42px !important; + margin: 0 0.35rem; + border: 1px solid rgb(255 255 255 / 0.35); + color: #fff !important; + .material-symbols-rounded { + font-size: 1.6rem !important; + } + } + + &-progress { + flex: 1; + min-width: 140px; + + .MuiSlider-root { + padding: 10px 0; + color: #7cc7ff; + } + .MuiSlider-rail { + background: rgb(255 255 255 / 0.16); + opacity: 1; + } + .MuiSlider-track { + border: 0; + } + .MuiSlider-thumb { + width: 12px; + height: 12px; + background: #fff; + box-shadow: none; + &:hover, + &.Mui-focusVisible { + box-shadow: 0 0 0 6px rgb(124 199 255 / 0.16); + } + } + .MuiTypography-root { + opacity: 0.55; + font-variant-numeric: tabular-nums; + font-weight: 400; + } + } + + &-right { + display: flex; + align-items: center; + gap: 0.1rem; + flex-shrink: 0; + + .MuiIconButton-root { + color: rgb(255 255 255 / 0.65); + &:hover { + color: #fff; + background: rgb(255 255 255 / 0.06); + } + .material-symbols-rounded { + font-size: 1.3rem; + } + } + } + + &-volume { + width: 84px !important; + margin: 0 0.35rem 0 0 !important; + color: #7cc7ff !important; + + .MuiSlider-rail { + background: rgb(255 255 255 / 0.16); + opacity: 1; + } + .MuiSlider-thumb { + width: 10px; + height: 10px; + background: #fff; + box-shadow: none; + } + } + } +} + +@media (max-width: 900px) { + .audio-player { + .media-bar-left { + min-width: 160px; + } + .media-bar-volume, + .media-bar-right .MuiSlider-root { + display: none; + } + } +} diff --git a/src/components/playback/audioPlayer/components/DeviceMenu.tsx b/src/components/playback/audioPlayer/components/DeviceMenu.tsx new file mode 100644 index 0000000..a88136f --- /dev/null +++ b/src/components/playback/audioPlayer/components/DeviceMenu.tsx @@ -0,0 +1,118 @@ +import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; +import type { SessionInfoDto } from "@jellyfin/sdk/lib/generated-client"; +import { + Divider, + IconButton, + ListItemIcon, + ListItemText, + Menu, + MenuItem, + Tooltip, +} from "@mui/material"; +import React, { useState } from "react"; + +type DeviceMenuProps = { + sessions: SessionInfoDto[]; + activeRemoteId: string | null; + localActive: boolean; + localItem?: BaseItemDto | null; + onSelectLocal: () => void; + onSelectRemote: (session: SessionInfoDto) => void; + onOpenRemoteControl: () => void; +}; + +const DeviceMenu = ({ + sessions, + activeRemoteId, + localActive, + localItem, + onSelectLocal, + onSelectRemote, + onOpenRemoteControl, +}: DeviceMenuProps) => { + const [anchor, setAnchor] = useState(null); + + const handleClose = () => setAnchor(null); + + return ( + <> + + setAnchor(event.currentTarget)} + > + devices + + + + { + handleClose(); + onSelectLocal(); + }} + > + + computer + + + + + {sessions.length === 0 ? ( + + + + ) : ( + sessions.map((session) => ( + { + handleClose(); + onSelectRemote(session); + }} + > + + + {session.NowPlayingItem ? "tv" : "devices_other"} + + + + + )) + )} + + { + handleClose(); + onOpenRemoteControl(); + }} + > + + settings_remote + + + + + + ); +}; + +export default DeviceMenu; diff --git a/src/components/playback/audioPlayer/index.tsx b/src/components/playback/audioPlayer/index.tsx index d8cdf70..4579823 100644 --- a/src/components/playback/audioPlayer/index.tsx +++ b/src/components/playback/audioPlayer/index.tsx @@ -1,23 +1,46 @@ +import type { + BaseItemDto, + SessionInfoDto, +} from "@jellyfin/sdk/lib/generated-client"; +import { PlaystateCommand } from "@jellyfin/sdk/lib/generated-client"; +import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api"; +import Divider from "@mui/material/Divider"; +import IconButton from "@mui/material/IconButton"; +import ListItemIcon from "@mui/material/ListItemIcon"; +import ListItemText from "@mui/material/ListItemText"; +import Menu from "@mui/material/Menu"; +import MenuItem from "@mui/material/MenuItem"; +import Slider from "@mui/material/Slider"; +import Tooltip from "@mui/material/Tooltip"; +import Typography from "@mui/material/Typography"; +import { useQuery } from "@tanstack/react-query"; import { useLocation, useNavigate } from "@tanstack/react-router"; import { AnimatePresence, motion } from "motion/react"; +import { useSnackbar } from "notistack"; import React, { type SyntheticEvent, useEffect, useRef, useState } from "react"; +import QueueButton from "@/components/buttons/queueButton"; import { secToTicks, ticksToSec } from "@/utils/date/time"; import getImageUrlsApi from "@/utils/methods/getImageUrlsApi"; +import { startInstantMix } from "@/utils/methods/instantMix"; +import { transferSessionToLocal } from "@/utils/methods/transferPlayback"; import { useApiInContext } from "@/utils/store/api"; import { setAudioRef, setIsMuted, setVolume, + stopPlayback, useAudioPlayback, } from "@/utils/store/audioPlayback"; import { useCentralStore } from "@/utils/store/central"; import { playItemFromQueue } from "@/utils/store/playback"; -import useQueue, { getNextTrackIndex } from "@/utils/store/queue"; -import PlayerActions from "./components/PlayerActions"; -import PlayerControls from "./components/PlayerControls"; -import PlayerInfo from "./components/PlayerInfo"; +import useQueue, { + cycleRepeatMode, + getNextTrackIndex, + shuffleUpcoming, +} from "@/utils/store/queue"; +import useRemoteControlStore from "@/utils/store/remoteControl"; +import DeviceMenu from "./components/DeviceMenu"; import PlayerProgress from "./components/PlayerProgress"; -import PlayerVolume from "./components/PlayerVolume"; import "./audioPlayer.scss"; @@ -26,6 +49,8 @@ const AudioPlayer = () => { const user = useCentralStore((s) => s.currentUser); const navigate = useNavigate(); const location = useLocation(); + const { enqueueSnackbar } = useSnackbar(); + const openRemoteDialog = useRemoteControlStore((s) => s.openDialog); const audioRef = useRef(null); const [url, display, item, volume, isMuted, startTimeTicks] = @@ -42,33 +67,99 @@ const AudioPlayer = () => { seekAppliedRef.current = false; }, [item?.Id]); - const [tracks, currentTrack] = useQueue((state) => [ + const [tracks, currentTrack, repeatMode] = useQueue((state) => [ state.tracks, state.currentItemIndex, + state.repeatMode, ]); const [playing, setPlaying] = useState(false); const [progress, setProgress] = useState(0); + const [selectedRemoteId, setSelectedRemoteId] = useState(null); + const [moreAnchor, setMoreAnchor] = useState(null); - // Sync volume and ref + const sessions = useQuery({ + queryKey: ["remoteSessions"], + queryFn: async () => { + if (!api || !user?.Id) return []; + const result = await getSessionApi(api).getSessions(); + return result.data; + }, + enabled: !!api && !!user?.Id, + refetchInterval: 3000, + networkMode: "always", + }); + + const remoteSessions = (sessions.data ?? []).filter( + (session: SessionInfoDto) => + session.Id && + session.DeviceId !== api?.deviceInfo.id && + session.UserId === user?.Id, + ); + const playingRemote = remoteSessions.find( + (session: SessionInfoDto) => session.NowPlayingItem, + ); + const selectedRemote = selectedRemoteId + ? remoteSessions.find( + (session: SessionInfoDto) => session.Id === selectedRemoteId, + ) + : undefined; + // Local playback takes precedence unless a remote device was selected. + const remote = selectedRemote?.NowPlayingItem + ? selectedRemote + : !display + ? playingRemote + : undefined; + + const activeItem: BaseItemDto | undefined | null = + remote?.NowPlayingItem ?? item; + const artists = activeItem?.ArtistItems?.length + ? activeItem.ArtistItems + : (activeItem?.AlbumArtists ?? []); + const artistNames = artists.map((artist) => artist.Name).filter(Boolean); + const subtitle = remote + ? [artistNames.join(", "), remote.DeviceName || remote.Client] + .filter(Boolean) + .join(" · ") + : artistNames.join(", ") || activeItem?.Album || ""; + const coverUrl = + api && activeItem?.Id + ? getImageUrlsApi(api).getItemImageUrlById( + activeItem.AlbumId ?? activeItem.Id, + "Primary", + { quality: 85, fillHeight: 120, fillWidth: 120 }, + ) + : undefined; + const isPlaying = remote + ? !remote.PlayState?.IsPaused + : playing; + const displayProgress = remote + ? (remote.PlayState?.PositionTicks ?? 0) + : progress; + const displayDuration = activeItem?.RunTimeTicks ?? 1; + const barVisible = (display && item) || Boolean(remote); + + useEffect(() => { + if (display) setSelectedRemoteId(null); + }, [display, item?.Id]); + + // Sync local audio element. useEffect(() => { if (display) { setAudioRef(audioRef); - if (audioRef.current) { audioRef.current.volume = isMuted ? 0 : volume; } } - }, [display, url, tracks?.[currentTrack]?.Id]); + }, [display, url, tracks?.[currentTrack]?.Id, isMuted, volume]); - // Update volume when state changes useEffect(() => { if (audioRef.current) { audioRef.current.volume = isMuted ? 0 : volume; } }, [volume, isMuted]); - // Media Session Metadata + // Media Session metadata/actions for local playback. useEffect(() => { if ("mediaSession" in navigator && item) { const imageUrl = item.ImageTags?.Primary @@ -77,50 +168,39 @@ const AudioPlayer = () => { tag: item.ImageTags.Primary, }) : undefined; - navigator.mediaSession.metadata = new MediaMetadata({ title: item.Name ?? "Unknown Title", artist: item.Artists?.join(", ") ?? "Unknown Artist", album: item.Album ?? "Unknown Album", artwork: imageUrl - ? [ - { - src: imageUrl, - sizes: "512x512", - type: "image/jpeg", - }, - ] + ? [{ src: imageUrl, sizes: "512x512", type: "image/jpeg" }] : [], }); } }, [item, api]); - // Media Session Action Handlers useEffect(() => { - if ("mediaSession" in navigator) { - navigator.mediaSession.setActionHandler("play", () => { - audioRef.current?.play(); - }); - navigator.mediaSession.setActionHandler("pause", () => { - audioRef.current?.pause(); - }); - navigator.mediaSession.setActionHandler("previoustrack", () => { - if (user?.Id && api) { - playItemFromQueue("previous", user.Id, api); - } - }); - navigator.mediaSession.setActionHandler("nexttrack", () => { - const nextIndex = getNextTrackIndex(); - if (nextIndex !== undefined && user?.Id && api) { - playItemFromQueue(nextIndex, user.Id, api); - } - }); - navigator.mediaSession.setActionHandler("seekto", (details) => { - if (audioRef.current && details.seekTime !== undefined) { - audioRef.current.currentTime = details.seekTime; - } - }); - } + if (!("mediaSession" in navigator)) return; + navigator.mediaSession.setActionHandler("play", () => { + audioRef.current?.play(); + }); + navigator.mediaSession.setActionHandler("pause", () => { + audioRef.current?.pause(); + }); + navigator.mediaSession.setActionHandler("previoustrack", () => { + if (user?.Id && api) playItemFromQueue("previous", user.Id, api); + }); + navigator.mediaSession.setActionHandler("nexttrack", () => { + const nextIndex = getNextTrackIndex(); + if (nextIndex !== undefined && user?.Id && api) { + playItemFromQueue(nextIndex, user.Id, api); + } + }); + navigator.mediaSession.setActionHandler("seekto", (details) => { + if (audioRef.current && details.seekTime !== undefined) { + audioRef.current.currentTime = details.seekTime; + } + }); }, [api, user?.Id]); const updatePositionState = () => { @@ -190,11 +270,13 @@ const AudioPlayer = () => { }; const handleNavigate = () => { - navigate({ to: "/player/audio" }); + if (remote) { + openRemoteDialog(remote.NowPlayingItem); + } else { + navigate({ to: "/player/audio" }); + } }; - // Listen to play/pause events directly from audio element to keep state in sync - // (e.g. if paused by media keys) const onPlay = () => { setPlaying(true); updatePositionState(); @@ -210,23 +292,339 @@ const AudioPlayer = () => { } }; + const remoteCommand = async ( + command: PlaystateCommand, + seekPositionTicks?: number, + ) => { + if (!api || !remote?.Id) return; + try { + await getSessionApi(api).sendPlaystateCommand({ + sessionId: remote.Id, + command, + seekPositionTicks, + controllingUserId: user?.Id, + }); + await sessions.refetch(); + } catch (error) { + console.error("Remote command failed", error); + enqueueSnackbar("Remote command failed", { variant: "error" }); + } + }; + + const transferToLocal = async () => { + if (!api || !user?.Id || !remote) { + setSelectedRemoteId(null); + return; + } + try { + const kind = await transferSessionToLocal(api, user.Id, remote); + setSelectedRemoteId(null); + await sessions.refetch(); + if (kind === "video") navigate({ to: "/player" }); + } catch (error) { + console.error("Transfer failed", error); + enqueueSnackbar("Could not transfer playback", { variant: "error" }); + } + }; + + const selectRemote = async (session: SessionInfoDto) => { + if (!session.Id) return; + try { + // Moving local playback: send the queue/position to the target first. + if (display && item?.Id && api && user?.Id) { + const queue = useQueue.getState(); + const ids = + queue.tracks + ?.map((track) => track.Id) + .filter((id): id is string => Boolean(id)) ?? []; + await getSessionApi(api).play({ + sessionId: session.Id, + playCommand: "PlayNow", + itemIds: ids.length > 0 ? ids : [item.Id], + startIndex: queue.currentItemIndex, + startPositionTicks: progress, + mediaSourceId: item.MediaSources?.[0]?.Id ?? undefined, + }); + stopPlayback(); + } + setSelectedRemoteId(session.Id); + await sessions.refetch(); + } catch (error) { + console.error("Could not switch device", error); + enqueueSnackbar("Could not switch device", { variant: "error" }); + } + }; + + const handleNext = () => { + if (remote) remoteCommand(PlaystateCommand.NextTrack); + else if (api && user?.Id) playItemFromQueue("next", user.Id, api); + }; + const handlePrevious = () => { + if (remote) remoteCommand(PlaystateCommand.PreviousTrack); + else if (api && user?.Id) playItemFromQueue("previous", user.Id, api); + }; + const handleShuffle = () => shuffleUpcoming(); + const handleRepeat = () => cycleRepeatMode(); + const handleRemoteSeek = (ticks: number) => { + remoteCommand(PlaystateCommand.Seek, Math.round(ticks)); + }; + + const handleMoreOpen = (event: React.MouseEvent) => + setMoreAnchor(event.currentTarget); + + const instantMix = async () => { + setMoreAnchor(null); + if (!api || !user?.Id || !activeItem) return; + try { + const { count } = await startInstantMix(api, user.Id, activeItem); + if (count === 0) { + enqueueSnackbar("No tracks found for Instant Mix", { + variant: "warning", + }); + } + } catch (error) { + console.error(error); + enqueueSnackbar("Could not start Instant Mix", { variant: "error" }); + } + }; + + const openCastForLocal = () => { + setMoreAnchor(null); + if (!item) return; + openRemoteDialog({ + item, + kind: "audio", + positionTicks: progress, + queue: tracks ?? [], + startIndex: currentTrack, + }); + }; + + if (!barVisible || location.pathname === "/player/audio") { + return null; + } + return ( - {display && ( - - + +
+ +
+ + {activeItem?.Name ?? "Unknown"} + + + {subtitle || "Blink"} + +
+ + more_horiz + +
+
+
+ {!remote && ( + + + shuffle + + + )} + + skip_previous + + + remote + ? remoteCommand(PlaystateCommand.PlayPause) + : handlePlayPause() + } + > + + {isPlaying ? "pause" : "play_arrow"} + + + + skip_next + + {!remote && ( + + + + {repeatMode === "one" ? "repeat_one" : "repeat"} + + + + )} +
+ +
+ +
+ {remote ? ( + + + + system_update_alt + + + + ) : ( + <> + + + + + {isMuted || volume === 0 ? "volume_off" : "volume_up"} + + + + { + const next = Array.isArray(value) ? value[0] : value; + handleVolumeChange(next); + }} + /> + + )} + openRemoteDialog()} + /> + + + open_in_full + + +
+ + setMoreAnchor(null)} + slotProps={{ paper: { className: "glass-menu-paper" } }} + > + + + radio + + + + {remote ? ( + { + setMoreAnchor(null); + transferToLocal(); + }} + > + + + system_update_alt + + + + + ) : ( + + + cast + + + + )} + { + setMoreAnchor(null); + openRemoteDialog(); + }} + > + + settings_remote + + + + + { + setMoreAnchor(null); + if (remote) { + remoteCommand(PlaystateCommand.Stop); + setSelectedRemoteId(null); + } else { + handleClose(); + } + }} + > + + stop + + + + + + {display && (
- )} + )} +
); }; diff --git a/src/components/remotePlaybackBar/index.tsx b/src/components/remotePlaybackBar/index.tsx deleted file mode 100644 index f142aa0..0000000 --- a/src/components/remotePlaybackBar/index.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import { PlaystateCommand, type SessionInfoDto } from "@jellyfin/sdk/lib/generated-client"; -import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api"; -import { Button, IconButton, Tooltip, Typography } from "@mui/material"; -import { useMutation, useQuery } from "@tanstack/react-query"; -import { useLocation, useNavigate } from "@tanstack/react-router"; -import { useSnackbar } from "notistack"; -import React from "react"; -import { transferSessionToLocal } from "@/utils/methods/transferPlayback"; -import { useApiInContext } from "@/utils/store/api"; -import { useAudioPlayback } from "@/utils/store/audioPlayback"; -import { useCentralStore } from "@/utils/store/central"; -import useRemoteControlStore from "@/utils/store/remoteControl"; - -import "./remotePlaybackBar.scss"; - -const RemotePlaybackBar = () => { - const api = useApiInContext((s) => s.api); - const user = useCentralStore((s) => s.currentUser); - const location = useLocation(); - const navigate = useNavigate(); - const { enqueueSnackbar } = useSnackbar(); - const openDialog = useRemoteControlStore((s) => s.openDialog); - const audioDisplay = useAudioPlayback((s) => s.display); - - const sessions = useQuery({ - queryKey: ["remoteSessions"], - queryFn: async () => { - if (!api || !user?.Id) return []; - // Get every session: many Jellyfin clients don't report - // SupportsRemoteControl, so filtering by controllableByUserId hides - // devices that can still receive commands. - const result = await getSessionApi(api).getSessions(); - return result.data; - }, - enabled: !!api && !!user?.Id, - refetchInterval: 5000, - networkMode: "always", - }); - - const remote = (sessions.data ?? []).find( - (session: SessionInfoDto) => - session.Id && - session.DeviceId !== api?.deviceInfo.id && - session.UserId === user?.Id && - session.NowPlayingItem, - ); - - const command = useMutation({ - mutationFn: async ({ - session, - command, - }: { - session: SessionInfoDto; - command: PlaystateCommand; - }) => { - if (!api || !session.Id) return; - await getSessionApi(api).sendPlaystateCommand({ - sessionId: session.Id, - command, - controllingUserId: user?.Id, - }); - }, - onSettled: () => sessions.refetch(), - }); - - const transfer = useMutation({ - mutationFn: async (session: SessionInfoDto) => - transferSessionToLocal(api, user?.Id, session), - onSuccess: async (kind) => { - await sessions.refetch(); - if (kind === "none") { - enqueueSnackbar("Could not transfer playback", { variant: "error" }); - return; - } - enqueueSnackbar("Playback transferred to this device", { - variant: "success", - }); - if (kind === "video") { - navigate({ to: "/player" }); - } - }, - onError: () => - enqueueSnackbar("Could not transfer playback", { variant: "error" }), - }); - - if (!remote || location.pathname.startsWith("/player")) { - return null; - } - - const paused = remote.PlayState?.IsPaused; - const title = remote.NowPlayingItem?.Name ?? "Unknown"; - - return ( -
- openDialog()} - > - cast_connected - -
- - Playing on {remote.DeviceName || remote.Client || "device"} - - - {title} - -
- - - command.mutate({ - session: remote, - command: paused - ? PlaystateCommand.Unpause - : PlaystateCommand.Pause, - }) - } - > - - {paused ? "play_arrow" : "pause"} - - - - -
- ); -}; - -export default React.memo(RemotePlaybackBar); diff --git a/src/components/remotePlaybackBar/remotePlaybackBar.scss b/src/components/remotePlaybackBar/remotePlaybackBar.scss deleted file mode 100644 index a89f485..0000000 --- a/src/components/remotePlaybackBar/remotePlaybackBar.scss +++ /dev/null @@ -1,42 +0,0 @@ -.remote-playback-bar { - position: fixed; - left: 50%; - bottom: 1rem; - transform: translateX(-50%); - z-index: 99; - display: flex; - align-items: center; - gap: 0.6rem; - width: min(620px, calc(100% - 2rem)); - padding: 0.4rem 0.4rem 0.4rem 0.6rem; - box-sizing: border-box; - border-radius: 12px; - background: rgb(18 18 24 / 0.97); - border: 1px solid rgb(255 255 255 / 0.1); - box-shadow: 0 10px 30px rgb(0 0 0 / 0.45); - color: white; - - &.with-audio { - bottom: 6.2rem; // above the 80px audio player - } - - .material-symbols-rounded { - color: rgb(255 255 255 / 0.85); - } - - &-info { - flex: 1; - min-width: 0; - display: flex; - flex-direction: column; - line-height: 1.15; - } - - &-device { - opacity: 0.6; - } - - &-title { - font-weight: 600; - } -} diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 5c8eb44..3ce62c8 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -28,7 +28,6 @@ import { HTML5Backend } from "react-dnd-html5-backend"; import Backdrop from "@/components/backdrop"; import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice"; import RemoteControlDialog from "@/components/remoteControl"; -import RemotePlaybackBar from "@/components/remotePlaybackBar"; import RouterLoading from "@/components/routerLoading"; import Search from "@/components/search"; import Updater from "@/components/updater"; @@ -59,7 +58,6 @@ export const Route = createRootRouteWithContext()({ -