Solution/Workaround for Mac OS High Sierra Unified Media Buttons (Play/Pause, Next and Previous Track) Problem

Mac OS High Sierra brings an annoying new feature (I guess you can insert “It’s not a bug; it’s a feature” joke here) for users who like using media keys to control their media player while browsing on Safari, be it iTunes, Spotify, or some other player. It’s the new unified media controls feature which takes control over your regular stand-alone player and gives it to the last player that you use, in most cases an HTML5 player on Safari, like the players on Youtube or Facebook. So, when you press the media keys, you start controlling the Youtube or Facebook video instead of iTunes or Spotify tracks. For Chrome users this is not a problem yet. But if you use Safari, it is very annoying to say the least.

I kind of devised a workaround to fix the problem albeit using a paid software which gives a 45 day free trial period. Here is how it goes.

  1. Download and install BetterTouchTool from here.
  2. Open your keyboard settings and check the last option to use media function keys as standard function keys. (We have this step because I couldn’t get BetterTouchTool to recognize media function keys. If someone can, I’ll update the post.)Screen Shot 2017-10-01 at 12.53.26.png
  3. Open the Shortcuts tab and disable “Show Desktop” and “Show Dashboard” functions.Screen Shot 2017-10-01 at 12.59.38
  4. Open BetterTouchTool (allow the BetterTouchTool in Accessibility settings in the first run) and go to the Keyboard tab.
  5. Set all the function keys like the one in the screenshot. As for the media buttons, choose Run Apple Script feature and enter the following scripts per your player preference. Mine is Spotify so I used Spotify. If you use iTunes, write “iTunes” instead.
    1. tell application "iTunes"
      	playpause
      end tell
    2. tell application "iTunes"
      	previous track
      end tell
    3. tell application "iTunes"
      	next track
      end tell

      Screen Shot 2017-10-01 at 13.46.46

      Screen Shot 2017-10-07 at 23.45.53Screen Shot 2017-10-07 at 23.46.10.png

There you go, the problem is temporarily solved until Apple does something about this.

Advertisements

21 thoughts on “Solution/Workaround for Mac OS High Sierra Unified Media Buttons (Play/Pause, Next and Previous Track) Problem”

  1. Great solution! This even fixes an old gripe that I had before High Sierra, namely that the control keys would stubbornly default to iTunes, even though I did not use iTunes at all. The only downside I can find is that the keymappings do not work when the user is not logged in, which does work with the native setup.

  2. To everyone wondering how to make this El Capitan-ish way for all the apps together:
    Write the script with “if” and as many apps as you would like (simple code so far because I am using only one of them each time)

    tell application “Spotify”
    if it is running then
    tell application “Spotify”
    playpause
    end tell
    end if
    end tell
    tell application “VLC”
    if it is running then
    tell application “VLC”
    playpause
    end tell
    end if
    end tell
    tell application “iTunes”
    if it is running then
    tell application “iTunes”
    playpause
    end tell
    end if
    end tell

  3. Love the idea — I’ve been using BTT for a while now (it’s a great piece of software). However, I’m not sure how to set up the Apple Scripts to run every time you use the keys? Treat this question as someone who has never used Apple Scripts before — apart from opening the application and pasting the code, I’m pretty lost.

    1. tesekkurler. AppleScript editorden yazinca Çalan muzik komutlara tepki verdi. ardindan tusunu yokladim, baktim ki media tuslarim geri gelmiş. Yalniz o 45 gunluk olan programi indirmedim. Su an hersey yolunda. Cok gec kalmis olsamda bilgisayarla ugrasmayi seviyorum ve programlama dillerine hafiften giris yaptim. Bunlar basta C++ (favorim) Js, Phyton. Henuz cok yeniyim. Emegine saglik. Thank you very much. It’s very useful. I start to learn a few programs like C++, Phyton, Js,… I believe every problem can be solve with good knowledge.

    1. Thank you so much for sharing this! I saw the workaround on this page and didn’t want to put the effort into it. You saved me.

  4. Great solution, but seriously why does APPLE keep removing features or substituting them for worse features? Damn I miss the good old days when Steve Jobs was around… he really made sure iTunes and syncing with devices worked in the most incredible way imaginable. Now, they are just incrementally getting further and further from this perfection. I want my old music app back from the earlier days. No integrated apple music (which I really believe should be a separate app or at least be able to completely disable it). Also when I create a new playlist in iTunes and sync my iPhone, it creates an extra copy of the original playlist before changing the current one. Before the sync mirrored exactly what was in your iTunes library… And now this button change… and in Xcode 9, they took away the really nice code folding feature… When will will get an update for the iTunes remote app? Overall, I still love my computer/phone, but I really wish they wish they would stop replacing great features for retarded things that I completely and utterly do NOT want!!!

    1. Oh yeah, also cannot forget they removed the headphone jack. What a bunch of morons. I am keeping my iPhone 6S plus for as long as I can… idk what I am going to do 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s