/SpotifyModal

A Post-SWC Replugged plugin that shows a little modal on your user dock that lets you see & control what you're playing on Spotify.

Primary LanguageTypeScriptMIT LicenseMIT

SpotifyModal

latest release lint status build status nightly status

install

Warning This plugin has moved to Socketlike/replugged-plugins

a post-swc Replugged plugin that shows a little modal on your user dock that lets you see & control what you're playing on Spotify.

Credits

Preview

Preview

Customization

there exists a settings menu which allows for a certain degree of customization.
modal css map:

  • root: #spotify-modal-root
    • modal: .spotify-modal | #spotify-modal
      • main view: .main
      • header: .header
        • cover art: .cover-art
        • track info: .track-info
          • song name: .title
          • artists: .artists
      • seekbar container: .seekbar-container
        • seekbar timestamps: .seekbar-timestamps
          • current: .current
          • song duration: .duration
        • seekbar: .seekbar
          • inner: .inner
          • grabber: .grabber
      • controls: .controls
        • repeat icons:
          • all: .repeat-all-icon
          • off: .repeat-off-icon
          • track: .repeat-track-icon
        • skip previous: .skip-prev-icon
        • play: .play-icon
        • pause: .pause-icon
        • skip next: .skip-next-icon
        • shuffle icons:
          • off: .shuffle-off-icon
          • on: .shuffle-on-icon
        • no icon: .no-icon
        • active (highlight): .active
    • divider: .divider

Known issues

  • leaving Spotify inactive for an hour or so will make the controls stop working until you manually update the player state in the Spotify app
    • fix: enable Automatic Reauthentication in Settings
  • the progress bar can be off by 1s - 5s at times when the Discord app lags and the Spotify state updates.
    • fix: none - we cannot trust Spotify's timestamps. they are wildly inaccurate for some reason
  • the modal does not update while playing episodes (shows)
    • fix: none - we don't get the item data for the episode at all (null). check it yourself by executing
      replugged.plugins
        .getExports('lib.evelyn.SpotifyModal')
        ._.events.on('message', (e) => console.log(ev.detail.currently_playing_type, ev.detail.item));
  • what happened to the no Spotify pause feature?

Miscellaneous

  • right clicking...
    • on the cover art copies the currently playing album URL, if there's any
    • on the song title copies the currently playing song's URL
    • on an artist's name copies the artist's user URL
    • on any empty spot in the modal allows you to view the controls context menu
  • clicking on the progress bar allows you to set current playback position

Roadmap

  • basic functionality
  • progress bar
  • controls
    • play / pause
    • skip forward / backward
    • shuffle
    • repeat
    • seeking
      • clicking on bar
      • scrubbing
    • like / unlike (docs/SCOPES)
    • volume control
  • custom oauth2 access tokens (docs/AUTHORIZATION)