I'm on a Mac with no TouchBar (so I don't think this answer will help) running 10.13. I had YouTube open and my media buttons weren't useful for stopping iTunes so that I could start a video. Is there a setting that will stop Safari from being able to use those buttons?
I would prefer not having to install 3rd party software to do this.
This is still going on in macOS 10.14