In High Sierra the media keys on the keyboard don’t always control iTunes, this app fixed it for me High Sierra Media Key Enabler