WebNowPlaying
Included with Macro DeckControl music and videos playing in your browser and show what is playing, through the WebNowPlaying extension.
Two Music Player widgets playing a track, one in the Full cover style and one in the Small cover style, both with the WebNowPlaying name and logo in the header
- Play, pause, skip, seek and volume for media in your browser
- Follows the tab that plays right now
- Music Player widget with title, artist and cover
- Variables for track, artist, site, progress and rating
- No setup dialog: turn it on and enable the extension's adapter
The WebNowPlaying integration connects Macro Deck to the WebNowPlaying browser extension. The extension reads what plays on supported websites in your browser, such as music and video sites, and passes it to Macro Deck. Macro Deck in turn sends play, pause, skip and the other commands back to the site.
There is no setup dialog. You turn the integration on in Macro Deck and switch on the Macro Deck adapter in the extension's settings. Macro Deck listens for the extension on port 8698 of the same computer.
What you can do
- Play, pause, skip, seek, turn shuffle on or off, set the repeat mode and change the volume of what plays in the browser.
- Show what is playing in the Music Player widget, with the site's name, the cover, progress and play and skip buttons.
- Use variables such as
webnowplaying_current_track_nameandwebnowplaying_player_namein button labels. - Bind a slider to
webnowplaying_volumeorwebnowplaying_current_position.
Some example setups:
- A Toggle Play/Pause button that pauses the video in your browser while you take a call.
- A Music Player widget that shows the song playing in your browser tab.
- A slider bound to
webnowplaying_volumeto change the volume of the site without switching windows.
How it behaves
When several tabs report media, Macro Deck follows one of them: the tab that plays with its sound on and was active most recently, then any tab that plays, then the tab that was active last. Commands go to that tab. Not every site supports every command; when the site cannot do something, for example set the repeat mode, the command does nothing. When the browser closes the extension's connection, the widget shows that nothing is playing, and Macro Deck picks it up again when the extension reconnects.
If another application already uses port 8698, for example Macro Deck 2 with the WebNowPlaying plugin, the issue WebNowPlaying port is already in use on the integration's page tells you so.
What you need
- The WebNowPlaying extension installed in your web browser.
- The browser running on the same computer as Macro Deck.
- The Macro Deck adapter (port
8698) turned on in the extension's Adapters settings.
Set it up
Step 1: Install the WebNowPlaying extension
Install the WebNowPlaying extension in the web browser on the computer that runs Macro Deck.
Step 2: Turn on the integration
In Macro Deck, click Integrations in the sidebar and click WebNowPlaying. Turn the integration on with the switch at the top right. It is off by default. The Overview tab shows No configuration options available for this integration., because there is nothing to set up.
Step 3: Turn on the Macro Deck adapter in the extension
Open the settings of the WebNowPlaying extension and go to Adapters. Turn on the Macro Deck adapter, which uses port
8698.Step 4: Check the connection
Play a song or video on a supported website. On the WebNowPlaying page under Integrations, open the Variables tab:
webnowplaying_is_connectedreadstrueandwebnowplaying_current_track_nameshows what plays.Step 5: Add an action to a button
On the Deck page, click the button you want to use. The deck must be unlocked: when the button at the top right reads Lock, it is unlocked. The editor opens with Short Press selected. Click + Add action, select WebNowPlaying on the left of the Add action dialog and pick an action such as Toggle Play/Pause. Then click Save.
Step 6: Press the button
Press the button on your deck. The media in your browser pauses or resumes.
Actions12
Put these on a button or run them from a flow.
- Play
- Resumes playback in the browser.
- Pause
- Pauses playback in the browser.
- Toggle Play/Pause
- Switches between play and pause, and shows the playback state on the button.
- Next Track
- Skips to the next track, where the site supports it.
- Previous Track
- Skips to the previous track, where the site supports it.
- Refresh State
- Reads the current playback state right away.
- Set Volume
- Sets the site's volume, from 0 to 100%.
- Volume Up
- Raises the volume by 10%.
- Volume Down
- Lowers the volume by 10%.
- Seek
- Jumps to a position in the current track, in seconds.
- Toggle Shuffle
- Turns shuffle on, off, or switches it, where the site supports it.
- Set Repeat Mode
- Sets repeat to Off, Repeat Track or Repeat Album/Playlist, where the site supports that mode.
Triggers6
A button or flow can react to these events.
- Track Changed
- A different track started playing, with its title, artist and album (under Music Player).
- Playback Started
- Playback started or resumed (under Music Player).
- Playback Paused
- Playback was paused (under Music Player).
- Playback Stopped
- Playback stopped (under Music Player).
- Volume Changed
- The volume changed, with the new and the previous value (under Music Player).
- Playback Device Changed
- Macro Deck now follows a tab on another site, with the new and the previous site name (under Music Player).
Variables15
Show these values on buttons and widgets, or use them in conditions.
webnowplaying_is_connected- Whether the extension is connected to Macro Deck.
webnowplaying_player_name- The name of the site that plays.
webnowplaying_current_track_name- The title of what plays.
webnowplaying_current_artist- The artist of what plays.
webnowplaying_current_album- The album of what plays.
webnowplaying_album_art_url- The address of the current cover in Macro Deck.
webnowplaying_playback_state- The playback state:
playing,pausedorstopped. webnowplaying_is_playing- Whether something plays right now.
webnowplaying_current_position- How far the track has played in seconds. You can also set it to seek.
webnowplaying_track_duration- The length of the track in seconds.
webnowplaying_progress_percentage- How far the track has played in percent.
webnowplaying_volume- The site's volume in percent. You can also set it, for example with a slider.
webnowplaying_shuffle_enabled- Whether shuffle is on.
webnowplaying_repeat_mode- The repeat mode:
off,trackorcontext. webnowplaying_rating- The rating the site reports for the track, as a number.
Widgets1
Add these to your deck from the widget picker.
- Music Player
- Shows what plays in the browser, with the site's name, the cover, progress and play, pause and skip buttons.
Frequently asked questions
Which websites work?
Every website the WebNowPlaying extension supports. Macro Deck only sees what the extension reports, so a site the extension does not support does not show up.
Does it work when the browser runs on another computer?
No. Macro Deck only accepts the extension's connection from the same computer. Install Macro Deck on the computer that runs the browser and connect your deck to it.
Why does a button do nothing?
The site that plays may not support that command, for example shuffle or a repeat mode. Macro Deck then skips the command. Also check that the webnowplaying_is_connected variable reads true and that the right tab plays.
Macro Deck says the WebNowPlaying port is already in use. What can I do?
Another application already listens on port 8698, often Macro Deck 2 with the WebNowPlaying plugin. Close that application, then turn the WebNowPlaying integration off and on again under Integrations.
I used the WebNowPlaying plugin in Macro Deck 2. Do my buttons carry over?
Yes, mostly. When you migrate from Macro Deck 2, the plugin's play/pause, next, previous and shuffle buttons move over to the matching actions. Repeat buttons do not, because Macro Deck 3 sets one repeat mode instead of cycling; use Set Repeat Mode instead.
More in Music and audio
Spotify
Included with Macro DeckControl Spotify playback, like songs, manage playlists and show what is playing on your deck.
YouTube Music Desktop App
Included with Macro DeckControl YouTube Music Desktop App from your deck: playback, volume, ratings and what is playing.
Jellyfin
Included with Macro DeckControl Jellyfin apps and TVs from your deck, show what plays and react when playback starts or stops.
SoundPad
Included with Macro DeckPlay sounds from your SoundPad list, control recordings and show the playing sound on your deck.
Voicemeeter
Included with Macro DeckControl the gain, mute, routing and macro buttons of Voicemeeter, Banana or Potato from your deck.