You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a generic Now Playing Surfaces interface so notch-style UI, local bridge integrations, menu bar widgets, and future playback surfaces can plug into one shared model instead of each integration wiring directly into PlayerService, lyrics fetching, WebView polling, settings, and app lifecycle.
Context
Two PRs are currently adding notch-related behavior through separate paths:
Both need the same core inputs: current track metadata, playback state, progress, artwork, like/shuffle/repeat state, volume, and optionally the current synced lyric line. They should not each own bespoke snapshot building, command routing, lyrics fetching, or polling lifecycle.
Proposal
Introduce a shared NowPlayingSurface layer:
NowPlayingSnapshot as the canonical read model for external/auxiliary playback surfaces.
NowPlayingSnapshotStore or equivalent observable store that derives snapshots from PlayerService and SyncedLyricsService.
NowPlayingCommandRouting to route commands like play, pause, seek, volume, next/previous, like/dislike, shuffle, and repeat.
NowPlayingSurfaceAdapter for concrete surfaces to start/stop against a narrow context.
LyricsPollingCoordinator so multiple lyric-consuming surfaces can share high-frequency WebView polling safely.
Boring Notch should be implemented as a bridge adapter, not as the generic interface itself:
LocalNowPlayingBridgeAdapter
-> BoringNotchCodec
The codec can translate:
NowPlayingSnapshot to the existing Boring Notch-compatible JSON payload.
Boring Notch HTTP/WebSocket requests to NowPlayingCommand.
This keeps Boring Notch support compatible with #210 while avoiding Boring Notch-specific concepts in core app lifecycle and settings.
Acceptance Criteria
There is one canonical now-playing snapshot used by native notch UI and local bridge integrations.
Surface adapters do not directly depend on PlayerService, SyncedLyricsService, SingletonPlayerWebView, or SettingsManager.
Music Island / native notch UI can render from NowPlayingSnapshot only.
Boring Notch compatibility can be expressed as LocalNowPlayingBridgeAdapter + BoringNotchCodec.
Synced lyric fetching and high-frequency WebView polling are coordinated centrally and do not stop incorrectly when one of multiple lyric surfaces disappears.
Settings store enabled surfaces generically, instead of adding one boolean per integration.
Summary
Create a generic Now Playing Surfaces interface so notch-style UI, local bridge integrations, menu bar widgets, and future playback surfaces can plug into one shared model instead of each integration wiring directly into
PlayerService, lyrics fetching, WebView polling, settings, and app lifecycle.Context
Two PRs are currently adding notch-related behavior through separate paths:
Both need the same core inputs: current track metadata, playback state, progress, artwork, like/shuffle/repeat state, volume, and optionally the current synced lyric line. They should not each own bespoke snapshot building, command routing, lyrics fetching, or polling lifecycle.
Proposal
Introduce a shared
NowPlayingSurfacelayer:NowPlayingSnapshotas the canonical read model for external/auxiliary playback surfaces.NowPlayingSnapshotStoreor equivalent observable store that derives snapshots fromPlayerServiceandSyncedLyricsService.NowPlayingCommandRoutingto route commands like play, pause, seek, volume, next/previous, like/dislike, shuffle, and repeat.NowPlayingSurfaceAdapterfor concrete surfaces to start/stop against a narrow context.LyricsPollingCoordinatorso multiple lyric-consuming surfaces can share high-frequency WebView polling safely.Suggested adapter shape:
Boring Notch Compatibility
Boring Notch should be implemented as a bridge adapter, not as the generic interface itself:
The codec can translate:
NowPlayingSnapshotto the existing Boring Notch-compatible JSON payload.NowPlayingCommand.This keeps Boring Notch support compatible with #210 while avoiding Boring Notch-specific concepts in core app lifecycle and settings.
Acceptance Criteria
PlayerService,SyncedLyricsService,SingletonPlayerWebView, orSettingsManager.NowPlayingSnapshotonly.LocalNowPlayingBridgeAdapter + BoringNotchCodec.Notes
Relevant existing architecture:
PlayerServiceis the playback source of truth.SyncedLyricsServiceis the lyric source of truth.