Pause Media intermittently launches VLC when it is not running
- Dominant language
- Swift
- Stars
- 2.9k
- Forks
- 226
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When Hex is configured to pause media while recording, it sometimes launches VLC even though VLC was previously closed. VLC starts hidden in the background and remains running after recording finishes.
macOS logs confirm that Hex initiated the launch while attempting to pause media:
```text
Sandbox: Hex deny(1) appleevent-send org.videolan.vlc
Sandboxed application with pid 33931 attempted to lookup App:"VLC"
Hex [com.kitlangton.Hex:Media] Paused media players
```
Immediately before this, CoreServicesUIAgent received a request from the Hex process and launched `org.videolan.vlc`.
**To Reproduce**
Steps to reproduce the behavior:
1. Enable **Pause Media** under **Audio Behavior while Recording**.
2. Ensure VLC is fully closed.
3. Start a recording using the Hex hotkey.
4. Stop the recording.
5. Check the Dock or Activity Monitor.
6. Observe that VLC has occasionally launched and remains running in the background.
The behavior is intermittent and may require multiple recordings to reproduce.
**Expected behavior**
Hex should pause only media applications that are already running and playing. It should not launch closed media applications while checking or attempting to control them.
**Desktop**
- Hex version: 0.8.4, build 91
- macOS version: 26.5.1
- Architecture: Apple Silicon
**Additional context**
VLC started at `11:53:35` with PID `8399`. The initiating process was Hex with PID `33931`. VLC was launched through macOS Launch Services/CoreServicesUIAgent rather than a VLC login item or background service.
Hex logged `Paused media players` immediately after attempting to send an Apple event to VLC. This suggests that the media-pausing implementation references VLC in a way that causes macOS to launch it even when it is not running.
Related issues such as #90 and #170 concern media failing to pause, but do not appear to cover closed media applications being launched.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing Hex’s media-pausing implementation from the recording hotkey path, using the macOS logs and the references to VLC and Apple events as entry points. Reproduce across multiple recordings and verify that closed VLC is not launched while already-running, playing media is still paused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100