INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Bluetooth Headphones start playing music when I turn them off  (Read 1157 times)

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music

Whenever I turn off my Bluetooth headphones, Media Center will start playing music. This happens even if i am only watching youtube. How do I keep MC from doing this strange thing? ? thanks!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 73140
  • Where did I put my teeth?
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #1 on: April 01, 2025, 01:54:46 pm »

Stop the playback before turning off?
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #2 on: April 01, 2025, 02:14:04 pm »

The playback is already stopped. this happens even when there is nothing playing on media center at all. If MC is in the background and I am listening to youtube etc. in chrome. when the earbuds are turned off by putting them back into its charging case, MC plays whatever was the last thing.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 73140
  • Where did I put my teeth?
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #3 on: April 01, 2025, 05:26:13 pm »

Stopped or paused?
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #4 on: April 01, 2025, 09:06:00 pm »

Stopped. after further testing I see that it will start playing whatever was the last zone's last track played. I tested on 2 different Bluetooth headphones. Cowin E7 and Shokz openfit air. EDIT: Simply turn on Bluetooth headphones and then when I turn it off, the music plays from the beginning. Even with MC in the background.

I am using an Mac M4 Max Studio.
Logged

Djordje

  • Recent member
  • *
  • Posts: 15
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #5 on: April 03, 2025, 11:47:33 am »

I am using Apple AirPods Pro and have a similar nuisance. Any time I put them in my ear or take them OFF - MC gets the "play" command from Mac OS.
Is there any option to disable "autoplay" by OS command/event?
Logged

Cooksons

  • Recent member
  • *
  • Posts: 11
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #6 on: April 03, 2025, 02:42:29 pm »

I am using Apple AirPods Pro and have a similar nuisance. Any time I put them in my ear or take them OFF - MC gets the "play" command from Mac OS.
Is there any option to disable "autoplay" by OS command/event?

I am having the exact same problem and just created a new post before seeing this one.  This happens whenever my Mac autoconnects to my AirPods--MC begins playing in the background (i.e. it's not the active window).
Logged

Cooksons

  • Recent member
  • *
  • Posts: 11
MC autoplaying upon Mac establishing Bluetooth connection
« Reply #7 on: April 03, 2025, 02:47:51 pm »

Hello,

I recently updated to MC 33 from MC 32, which seems to have coincided with a new issue.  From what I can tell, whenever my Mac Studio automatically connects to a Bluetooth device (e.g. when someone calls my phone and my Mac tries to take the call and I'm wearing my Airpods), MC 33 begins playing (i.e. autoplays) my entire music library from the Audio>Album Tagging View window.  I have searched the web and cannot find a way to prevent this.  Thank you for any help.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Logged

Cooksons

  • Recent member
  • *
  • Posts: 11
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #9 on: April 04, 2025, 12:49:56 am »

Thank you.  I did attempt to turn off Autoplay in the Music app on both my Mac and my iPhone and, wow, I cannot seem to make the infinity icon appear without subscribing to Apple Music.

Am I missing something?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #10 on: April 04, 2025, 02:02:10 am »

This is perhaps a per-app setting.
For MC, try disabling the Media Keys option, or change to a different mode: Options > General > Advanced: Media key mode

The underlying problem is that some Bluetooth headphones like yours will issue a play/pause keypress when docked, and the application has no way to know if it was the user that pressed the button or not.
Logged

Djordje

  • Recent member
  • *
  • Posts: 15
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #11 on: April 04, 2025, 05:26:29 pm »

This is perhaps a per-app setting.
For MC, try disabling the Media Keys option, or change to a different mode: Options > General > Advanced: Media key mode

The underlying problem is that some Bluetooth headphones like yours will issue a play/pause keypress when docked, and the application has no way to know if it was the user that pressed the button or not.

Makes sense. Options > General > Advanced: Media key mode > Disabled killed it, no more unwanted Plays.
Logged

Cooksons

  • Recent member
  • *
  • Posts: 11
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #12 on: April 05, 2025, 12:21:49 pm »

Very strange.  My Media Key Mode is already Disabled.

I just reproduced the issue by wearing my AirPods and having my wife call my phone.  Immediately, 1) a notification popped up on my Mac Studio (top right corner of screen) asking me to answer or decline, 2) JRiver MC started playing (track playing notification box popped up at bottom right corner of screen), and 3) the Playback Problem screen popped up dead center in front of what I was doing (see attached).
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #13 on: April 05, 2025, 10:59:40 pm »

yeah, my Media key Mode is already disabled. Still an issue.
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #14 on: April 06, 2025, 02:27:55 pm »

Just wanted to add that I had been using the windows version of MC for years and years with these Bluetooth devices which was not a problem. This issue cropped up after switching to Mac just a couple of weeks ago.
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #15 on: April 08, 2025, 03:16:19 pm »

I hope we can find a work around for this. I wish it was a minor annoyance but I have relied on Bluetooth headphones and MC for years for my work and it had been great with Windows. Now that I am on Mac, my workflow has been disrupted. I Use MC for songwriting and when my connection to bluetooth is lost because I walk out of the room, My secret work is being blasted to everyone to hear. I have tried all kinds of work arounds but this is persistant. Can the Developers reproduce the issue?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 73140
  • Where did I put my teeth?
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #16 on: April 08, 2025, 04:04:30 pm »

Isn't this an Apple problem?   Did you try their Discussion Group?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #17 on: April 08, 2025, 04:34:05 pm »

Does MC log Media keycodes? With my headset, the log shows MC issuing an MCC 10000 command (PLAY/PAUSE toggle) when I press the button. This is OK for the VK_MEDIA_PLAY_PAUSE (0xB3) keycode. Perhaps this headset on Mac is issuing a VK_PAUSE or some other keycode instead which is being mishandled?

Can you enable logging and reproduce the issue to compare with this snippet?

0131002: 21032: General: CHotKeyHelper::ProcessMCC: Start
0131002: 21032: General: CHotKeyHelper::ProcessMCC: Hot key type: Hook; Command: 10000, 0
0131003: 21032: General: CHotKeyHelper::ProcessMCC: Elapsed time since last hot key: 19940 ms
0131003: 21032: General: CHotKeyHelper::ProcessMCC: Sending MCC (10000, 0)
0131003: 21032: Playback: CMJPlayerCore::Pause: Start
0131006: 21032: Playback: CMJPlayerCore::Pause: Finish (2 ms)
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Finish (4 ms)
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Start
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Hot key type: Hot key; Command: 10000, 0
0131007: 21032: General: CHotKeyHelper::ProcessMCC: Ignoring (because of user options or different handler)
0131007: 21032: General: CHotKeyHelper::ProcessMCC: Finish (0 ms)
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #18 on: April 08, 2025, 04:35:59 pm »

Isn't this an Apple problem?   Did you try their Discussion Group?

This only happens with J River MC in my experience. I did not find any solutions when I searched other forums. I have been working on this a little bit everyday. I will continue to do so...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #19 on: April 08, 2025, 04:38:46 pm »

You can also run a tool like this to record which keys the headset is sending to the Mac:
https://apps.apple.com/us/app/key-codes/id414568915?mt=12

This would be useful to debug the issue (if it works). Try running it with MC closed to see if it shows any keypress when the headset is docked.
Also, what's the brand/model of those headphones? I supposed you tried different ones and it only happens with those?

Edit: Same issue on Windows, different solutions proposed:
https://www.reddit.com/r/techsupport/comments/rf4rkr/bluetooth_headset_sends_auto_playpause_commands/

In the end it's a headset issue. However, setting the Media Keys to 'disabled' in MC should have worked to ignore it...
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #20 on: April 08, 2025, 04:57:26 pm »


Quote
Does MC log Media keycodes? With my headset, the log shows MC issuing an MCC 10000 command (PLAY/PAUSE toggle) when I press the button. This is OK for the VK_MEDIA_PLAY_PAUSE (0xB3) keycode. Perhaps this headset on Mac is issuing a VK_PAUSE or some other keycode instead which is being mishandled?

Can you enable logging and reproduce the issue to compare with this snippet?

0131002: 21032: General: CHotKeyHelper::ProcessMCC: Start
0131002: 21032: General: CHotKeyHelper::ProcessMCC: Hot key type: Hook; Command: 10000, 0
0131003: 21032: General: CHotKeyHelper::ProcessMCC: Elapsed time since last hot key: 19940 ms
0131003: 21032: General: CHotKeyHelper::ProcessMCC: Sending MCC (10000, 0)
0131003: 21032: Playback: CMJPlayerCore::Pause: Start
0131006: 21032: Playback: CMJPlayerCore::Pause: Finish (2 ms)
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Finish (4 ms)
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Start
0131006: 21032: General: CHotKeyHelper::ProcessMCC: Hot key type: Hot key; Command: 10000, 0
0131007: 21032: General: CHotKeyHelper::ProcessMCC: Ignoring (because of user options or different handler)
0131007: 21032: General: CHotKeyHelper::ProcessMCC: Finish (0 ms)
This is from Chatgpt:

Thanks for sharing the log — this is a verbose JRiver Media Center debug log showing what the software was doing at a very detailed level. Here’s what I can decipher relevant to your issue — audio unexpectedly starting on your Mac when you turn off Bluetooth headphones, particularly in JRiver:



🔍 Key Events in the Log
   1.   DLNA Events Detected:
   •   The lines like:

Playback: CPlayerZone::DLNADeviceSubscription_PropertyChanged: Transport state was 2 changing to 3
Playback: CPlayerZone::DLNADeviceSubscription_PropertyChanged: Transport state was 3 changing to 2

These refer to DLNA device state changes — DLNA is JRiver’s networking feature, possibly tied to how your audio outputs switch between devices.

   2.   Audio Device Switching Detected:
   •   This is important:

Playback: CCoreAudioPlugin::StartCoreAudio: Output device '(Default)' empty (transient)?
Playback: CCoreAudioPlugin::StartCoreAudio: Output device name: Universal Audio Thunderbolt

This tells us JRiver reinitialized audio output after device changes — it noticed the default output was empty (because Bluetooth headphones disconnected), and automatically fell back to Universal Audio Thunderbolt output (your Mac or interface).

   3.   Playback Started Automatically:
   •   Near this section:

Playback: CPlayerZone::Play: Processing play for '/Volumes/Workspace 2/AUDIO/Music/FLAC/...'

It looks like JRiver initiated playback on its own. No user trigger is logged immediately before it, implying something triggered automatic playback when audio output changed.



🧠 What’s Likely Happening
   •   When your Bluetooth headphones disconnect, macOS switches the default audio output to built-in speakers or your audio interface.
   •   JRiver sees a device change and treats it like a new playback opportunity — possibly from a previous paused state.
   •   If “resume on device change” is enabled or JRiver is responding to DLNA or system triggers, it might auto-resume or restart playback.



🛠️ What You Can Try to Fix It
   1.   Turn off “Resume playback on startup or zone switch”:
   •   JRiver > Tools > Options > Startup > Uncheck “Start playing current playlist” or similar resume settings.
   2.   Set Output Device Manually:
   •   Under Tools > Options > Audio > Audio Device, instead of “Default Audio Device,” choose a specific one like “Bluetooth Headphones” or your interface.
   •   This can stop it from switching unexpectedly when the system audio output changes.
   3.   Disable DLNA if Unused:
   •   DLNA events are being handled repeatedly — if you don’t use JRiver for home network streaming, disable DLNA in Tools > Options > Media Network.
   4.   Check for Bluetooth Device Sending Play Signals:
   •   Some Bluetooth devices send a “play” or “media control” command on disconnect.
   •   macOS interprets this, and JRiver might respond by resuming playback.



Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #21 on: April 08, 2025, 05:12:56 pm »

What about you post the actual log instead of an AI opinion?
If you're using DLNA and your headset is paired to more than one PC, it's possible it's your other PC that's receiving the command.
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #22 on: April 08, 2025, 05:48:17 pm »

What about you post the actual log instead of an AI opinion?
If you're using DLNA and your headset is paired to more than one PC, it's possible it's your other PC that's receiving the command.

I thought it would be helpful to post the AI opinion.
Logged

akhunaton

  • Regular Member
  • World Citizen
  • ***
  • Posts: 159
  • I Love Music
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #23 on: April 08, 2025, 05:53:04 pm »


Attached the log...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #24 on: April 08, 2025, 06:18:50 pm »

This log seems to show only one play -> stop cycle, lasting about 6 seconds.
Logged

Djordje

  • Recent member
  • *
  • Posts: 15
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #25 on: Yesterday at 11:09:29 am »

I am attaching the JRiver debug log. With all options like Media keys etc., disabled, as discussed in this thread, what I did was this:
- both Air Pods Pro in my ears, JRiver playback stopped
- removed one of the AirPods, and JRiver started playing the current track on its own (unexpected behaviour)
- stopped playback, inserted the left AirPod in
- started playback, removed one AirPod - playback stopped (expected behaviour with MediaKey enabled, but it was not)
- inserted the AirPod back in, playback started (expected behaviour with MediaKey enabled, but it was not)
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #26 on: Yesterday at 11:54:23 am »

I think you're holding it wrong  ;)
https://support.apple.com/guide/airpods/use-controls-and-gestures-with-your-airpods-devb2c431317/1.0/web/1.0

Just holding the stem issues a play/pause command. It's a silly design as you must hold it to insert or remove the pod in your ears... According to the article you can disable that in the Airpod settings app.

That said, MC should not be reacting to the commands after you tell it to ignore the media keys, so something is wrong there.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2951
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #27 on: Yesterday at 02:49:54 pm »

The log shows that there are no Media Keys being received/processed by MC. Whatever is causing the play/pause, it's not a media key and doesn't seem to be logged by MC. @Matt, any idea?
Logged

Djordje

  • Recent member
  • *
  • Posts: 15
Re: Bluetooth Headphones start playing music when I turn them off
« Reply #28 on: Yesterday at 11:42:48 pm »

I think you're holding it wrong  ;)
https://support.apple.com/guide/airpods/use-controls-and-gestures-with-your-airpods-devb2c431317/1.0/web/1.0

Good point, but no, I was holding it right :)
No, not but the stem - I thought about it. It's just an action of airpod removal from my ear that causes JRiver to start playing.
Logged
Pages: [1]   Go Up