Media keys not working for iTunes (pause/play, skip buttons)

This is an intentional change in macOS High Sierra. Rather than the media keys always controlling iTunes, they will now control whatever media is playing at a given moment.

9To5Mac has detailed a way to change this behavior with a third-party application, macOS High Sierra Media Key Enabler for iTunes and Spotify:

Apple just released High Sierra and it brought good things and annoying things : they changed the behaviour of the media controller keys, they no longer control itunes, they control the video playback in safari. This pissed off a lot of people including me, so I just created a menu bar app to proxy media key events to iTunes/Spotify while Apple fixes this. It doesn't support touchbar yet, only physical buttons.