Add configurable auto-pause delays for YouTube video compatibility
## Summary
Implements user-configurable delays for auto-pause functionality to resolve issues where brief speaker pauses caused unwanted music resumption during YouTube videos.
Fixes #203
## Changes
- **New preferences UI** with logarithmic sliders for fine control at small values
- **Configurable delays**: 0ms (disabled) to 10000ms for both pause and unpause delays
- **Default values**: 1500ms pause delay, 3500ms max unpause delay
- **Persistent storage** via NSUserDefaults with proper validation
- **Zero-delay support** for immediate pause/unpause behavior
## Test plan
- [x] Build completes successfully
- [x] UI displays correctly in preferences menu
- [x] Sliders provide logarithmic scaling for fine control
- [x] Zero delays disable respective functionality
- [x] Settings persist across app restarts
- [x] YouTube video pause issue resolved
## Technical Details
- Added `pauseDelayMS` and `maxUnpauseDelayMS` properties to `BGMUserDefaults`
- Modified `BGMAutoPauseMusic` to use configurable delays instead of hardcoded constants
- Created new preferences UI with logarithmic sliders for better UX at small values
- Proper validation and clamping of delay values (0-10000ms range)
- Zero-delay handling for immediate behavior when delays are disabled
合并状态:未合并 关闭于 2025-06-29 1 条评论