kyleneideck / BackgroundMusic

Background Music, a macOS audio utility: automatically pause your music, set individual apps' volumes and record system audio.
GNU General Public License v2.0
16.29k stars 676 forks source link

Per-app Volume and Chrome #61

Open tmikaeld opened 8 years ago

tmikaeld commented 8 years ago

Does not seem to work with Chrome and HTML5 Audio.

joshuwhi commented 5 years ago

This is still an issue 3 years later, bumping.

kyleneideck commented 5 years ago

I just tested this with some YouTube and Vimeo videos (which use HTML5 video) in Chrome 74.0.3729.131 and it worked for me. Unless I can figure out a way to reproduce the problem locally, you might have to install a debug build to get debug logs for this.

When you change Chrome's app volume with a debug build installed, Background Music.app should log a line like this:

BGMAppVolumes::appVolumeChanged: App volume for com.google.Chrome (16054) changed to 50

And when Chrome starts playing audio, the coreaudiod process (which "hosts" BGMDriver) should log a line like this:

BGM_Clients::StartIO: Client 536 (com.google.Chrome, 16054) starting IO

If the bundle ID isn't "com.google.Chrome" in both of those lines, Background Music probably won't realise the two are related and that would explain why the app volume slider isn't working for you. It might also be enough info to fix the problem.

hahastudio commented 5 years ago

I use the debug build 0.2.0-DEBUG-b3b4482 (I didn't find any new debug build) to get log.

From the log:

default 22:23:07.900669 +0800 coreaudiod BGM_Clients::StartIO: Client 168 (com.google.Chrome.helper, 1701) starting IO default 22:24:29.629361 +0800 Background Music BGMAppVolumes::appVolumeChanged: App volume for com.google.Chrome (1632) changed to 77

From the log, it seems that Chrome uses a different process (Google Chrome Helper) to play audio.

Chrome 76.0.3809.100 macOS Mojave 10.14.6 (18G84)

qroniq commented 4 years ago

I'm also noticing this issue.

Chrome 78.0.3904.108 macOS 10.14.6 (18G1012)

I've subscribed to this thread.. happy to beta test etc :)

Cheers!