Universal Chrome Extension for Audio Control in DeskThing
๐ Latest Update: Enhanced CACP with robust image processing and comprehensive logging system (v0.1.3 app / v0.3.26 extension)
soundcloud-app/- Working SoundCloud DeskThing app (v1.0.1 beta)soundcloud-extension/- Working Chrome extension for SoundCloud
cacp-app/- Universal DeskThing app (v0.1.3) - Enhanced with image processing & comprehensive loggingcacp-extension/- Multi-site Chrome extension (v0.3.26) - 90%+ complete
scripts/- Build tools and utilitiesdocs/- Organized project documentationdocs/cacp/- CACP architecture and development guidesdocs/soundcloud/- Historical SoundCloud implementation docs
Always bump versions when making changes to ensure you're working with the right build:
# CACP App (cacp-app/)
# Edit package.json and deskthing/manifest.json - increment version
# Example: 0.1.3 โ 0.1.4
# CACP Extension (cacp-extension/)
# Edit manifest.json - increment version
# Example: 0.3.26 โ 0.3.27
# Rebuild both after version changescd cacp-app
npm run build
# Output: dist/cacp-v[VERSION].zipcd cacp-extension
npm run build
# Output: dist/ folder for Chrome extension loading- Build the CACP app:
cd cacp-app && npm run build - Open DeskThing Desktop App
- Navigate to Apps โ Install App โ Local Installation
- Select
cacp-app/dist/cacp-v[VERSION].zip - Install and start the CACP app
- Build the extension:
cd cacp-extension && npm run build - Open Chrome โ Extensions โ Developer Mode (ON)
- Load Unpacked โ Select
cacp-extension/dist/folder - Pin the CACP extension to toolbar for easy access
- Start CACP app in DeskThing (should show "Ready for Chrome extension connections")
- Navigate to SoundCloud or YouTube in Chrome
- Open CACP extension popup (should show site detection)
- Play music and test controls from DeskThing device
Primary Location (macOS):
/Users/[username]/Library/Application Support/DeskThing/logs/readable.logAlternative Locations:
- Desktop (macOS):
/Users/[username]/Library/Application Support/DeskThing/ - Device (Linux):
~/.config/DeskThing/logs/or/var/log/deskthing/ - Per-app logs:
/Users/[username]/Library/Application Support/DeskThing/apps/cacp/logs/
Look for these log entries in DeskThing logs:
# Startup logs
๐ [CACP-Server] Starting enhanced CACP app v0.1.3 with comprehensive logging and image processing
โ
[CACP-Server] CACP App v0.1.3 Started Successfully - Ready for Chrome extension connections
# Connection logs
๐ [CACP-Server] Chrome extension connected from: 127.0.0.1
๐จ [CACP-Server] Received from extension: mediaData (soundcloud)
# Image processing logs
๐ผ๏ธ [CACP-MediaStore] New artwork detected: https://i1.sndcdn.com/...
โ
[CACP-MediaStore] Artwork cached: /resource/image/cacp/track-artist.jpg
# Media control logs
๐ก [CACP-Server] DeskThing NEXT event received
๐ฎ [CACP-MediaStore] Sending command to extension: nexttrackBrowser Console:
- Open Chrome DevTools (F12)
- Console tab โ Filter by "CACP"
- Look for: Extension version, site detection, WebSocket status
Extension Popup Logs:
- Click CACP extension icon
- View real-time connection status and logs
- Copy logs for debugging (copy button in popup)
# CACP App - Check DeskThing logs for:
๐ [CACP-Server] Starting enhanced CACP app v0.1.3
# CACP Extension - Check popup or console for:
CACP Extension v0.3.26 initialized
# Extension Popup - Shows version in bottom corner
v0.3.26- Check logs for:
๐ผ๏ธ [CACP-MediaStore] New artwork detected - Verify: Image processing completes with
โ [CACP-MediaStore] Artwork cached - Path format: Should be
/resource/image/cacp/filename.jpg
- Check:
๐ [CACP-Server] Chrome extension connectedin DeskThing logs - Verify: WebSocket server started on port 8081
- Test: Extension popup shows "Connected" status
- Check: Extension popup shows current site
- Verify: Content script loaded on supported sites
- Supported: SoundCloud, YouTube (not YouTube Music yet)
CACP is a universal Chrome audio control platform that provides seamless music control integration between web-based audio services and DeskThing. Instead of being limited to just SoundCloud, CACP supports multiple music streaming platforms through a modular, contributor-friendly architecture.
- SoundCloud - Complete implementation with real-time control via
soundcloud-extension/
- SoundCloud - โ Fully migrated to modular architecture (v0.3.26)
- YouTube - โ Handler implementation complete (testing phase)
- Spotify Web - ๐ Framework ready, selectors need updates
- Apple Music Web - ๐ Basic selectors implemented
- YouTube Music - ๐ Framework ready for implementation
SoundCloud โ Chrome Extension โ SoundCloud App WebSocket (port 8081) โ DeskThing โ Car Thing
Multiple Sites โ Universal Chrome Extension โ CACP App WebSocket (port 8081) โ DeskThing โ Car Thing
โโโ Site Detection & Priority
โโโ Modular Site Handlers
โโโ Image Processing Pipeline
โโโ Comprehensive Logging
โโโ User Settings UI
Communication: Single WebSocket connection with site identification in messages
Image Processing: Downloads and caches artwork locally at /resource/image/cacp/
Logging: Comprehensive debugging with DeskThing.sendLog throughout all components
- Architecture - Technical design and patterns
- Roadmap - Project vision and implementation phases
- Contributing - How to add new site support
- Site Template - Template for new site handlers
- API Reference - Interface specifications
- Implementation History - Historical development documentation
- About DeskThing - Platform background and context
Current Phase: ๐ Enhanced Testing Phase
- CACP App v0.1.3: Production-ready with image processing & comprehensive logging
- CACP Extension v0.3.26: 90%+ complete with SoundCloud + YouTube handlers
- Image Processing: โ Fixed - downloads and serves artwork locally
- Logging System: โ Complete - comprehensive debugging throughout
Recent Enhancements (v0.1.3):
- โ Image Processing Pipeline - Borrowed from SoundCloud app, fixes artwork display
- โ Comprehensive Logging - DeskThing.sendLog throughout all components
- โ Enhanced MediaStore - Robust state management and error handling
- โ Dynamic Version Logging - Version numbers in all log outputs
- โ Production Architecture - Proper lifecycle management and resource cleanup
Next Phase: ๐ฏ Multi-Site Validation
- Complete extension testing across SoundCloud + YouTube
- Performance optimization and error recovery
- Community contribution pipeline
# 1. Make changes to CACP app or extension
# 2. Bump version numbers in manifests/package.json
# 3. Rebuild both components
cd cacp-app && npm run build
cd ../cacp-extension && npm run build
# 4. Reload in DeskThing and Chrome
# 5. Test with SoundCloud/YouTube
# 6. Check logs for version confirmation and debugging
# 7. Look for version logs:
# ๐ [CACP-Server] Starting enhanced CACP app v0.1.3
# CACP Extension v0.3.26 initializedEvolution Path: SoundCloud App โ Chrome Audio Control Platform (CACP)
Current Focus: Extension validation and multi-site testing with comprehensive logging
Image Processing: โ
RESOLVED - Local artwork caching working reliably