Spotify Now Playing Widget turns into Chromium when playing Youtube on Browser

I use Brave Browser, usually when I play youtube video on the browser, the widget still shows Spotify player, I can play and pause music while watching youtube video.

Recently, I noticed things have changed. When I play youtube video on browser, the widget's text turns into Chromium and the widget now controls the youtube video that I am playing, thus I cannot stop or play spotify until I focus on spotify app or close the youtube tab.

Screenshots

Device information:

  • Type of Mac: Macbook Pro 2018 256GB Touch Bar
  • macOS version: 10.14.2
  • BetterTouchTool version: 2.800

the widget is based on the macOS now playing api. It should e.g. show the same as the player widget in the macOS notification center. Unfortunately I can't influence which app is providing the player data . Maybe there is some option in Brave to turn this off?

Thankyou, I found out that this was recently implemented by Google on Chrome 73. Chrome controls the multimedia keys on connected devices, and this also affects the touch bar.

If anyone else experience this same problem on Chrome or other chromium browser, try disabling it.

  1. Load chrome://flags/#hardware-media-key-handling in the Chrome address bar; this should open the right flag when loaded.
  2. Set the Hardware Media Key Handling flag to Disabled.
  3. Restart Google Chrome.
3 Likes

I think this is a great thing and I'd like to use it with this new Chrome media key handling thing.

But there is one problem... BTT does not show a title of, for example, YouTube page, and the only thing that I'm seeing is a "Chrome" label

As a different widget, I'm using this script, to pull YouTube tabs names and shows it on my touchbar:

if application "Google Chrome" is running then
	tell application "Google Chrome"
		repeat with t in tabs of windows
			tell t
				if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then
					return text 1 thru -11 of (title of t as text)
				end if
			end tell
		end repeat
	end tell
end if
return ""

Is there a way to combine functionalities of this two widgets in one?

1 Like

Oh thank the lord. This has been bothering me so much lately. I like always having Spotify on the touch bar so I can quickly pause whatever is playing when I watch something in a browser.

I turned off the #hardware-media-key-handling flag in Chrome, but now BTT doesn't detect Spotify at all anymore! Something is definitely really wonky with the Now Playing widget!

Attached are my settings if this is helpful.
touchbar-nowplaying-spotify.bttpresetcompressed.bttpresetcompressed (50.1 KB)
MacOs 10.14.5
BTT 3.0903
Chrome 75
Spotify 1.1.9.383

Edit: Sorry I jumped the gun. Spotify still works, but only if I'm listening on the laptop. If I am casting to another speaker, BTT Now Playing widget doesn't pick up on it, but pause/play widgets still can play/pause.

Thank you!
This was driving me insane