- Add ffmpeg stderr monitoring to catch audio decoding errors
- Add HTTP timeout parameters (-connect_timeout, -read_timeout) for VPS reliability
- Add URL validation in yt-dlp to ensure audio URLs are resolved
- Add comprehensive logging to mediaController for queue operations
- Add logging to musicPlayer for ffmpeg command execution and errors
- Update musicPlayer test to expect new timeout parameters
Fixes:
1. Silent audio issue: ffmpeg errors are now visible in logs
2. Queue bypass: Added logging to track queue → playback flow
3. VPS network issues: Added timeouts for HTTP stream connections
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Call unpause() when starting a stream in DiscordPlayer to prevent getting stuck in a paused state.
- Call stop() instead of pause() in VoiceController on disconnect to fully reset the player.
- Add user-agent header to ffmpeg calls in MusicPlayer and Transcoder to prevent YouTube 403 Forbidden on VPS.
- Add screenshare streams to the media queue when successfully started.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Introduced a new `ScreenShareController` to manage YouTube screenshare functionality.
- Updated `DiscordPlayer` to track ownership of audio streams, preventing conflicts between music playback and screenshare.
- Added error handling for various states including voice connection checks and media busy states.
- Created unit tests for `ScreenShareController` and `DiscordPlayer` ownership rules to ensure correct functionality.
- Added documentation for the new media echo fix and screenshare design.