Commit Graph

8 Commits

Author SHA1 Message Date
Glenn Thompson 3aa21c8278 Add About and Status pages with improved navigation
- Added About page with detailed technical stack, AGPL license info, and community links
- Added Status page for both frameset and non-frameset modes
- Fixed all navigation links to use /asteroid/frameset as home (workaround for Radiance routing)
- Removed broken AJAX loadInFrame() navigation in frameset content pages
- Fixed logout buttons to redirect properly after logout
- Added spectrum analyzer support for live-stream-audio element ID
- Updated all Home links across the site to avoid Radiance welcome page
- Made About and Status pages consistent between frameset and non-frameset modes
- Added proper navigation to all pages with About, Status, and other links
2025-12-07 14:27:54 +03:00
Glenn Thompson b54af08eeb Fix frameset mode persistent audio and spectrum analyzer
Frameset mode now works correctly with:
- Persistent audio across all navigation via AJAX
- Spectrum analyzer MUTED indicator working
- Now Playing panel updates (200ms delay)
- Interval cleanup before navigation
- Cache-control headers for player.js

Fixed issues:
- Replace all == operators with equal in player.lisp
- Add defvar instead of let in redirect-when-frame
- Add interval/timeout cleanup before AJAX navigation
- Fix spectrum analyzer re-initialization after navigation
- Add cache-busting headers for JavaScript

Known issue:
- Non-frameset mode has ParenScript compilation issue
- Only 15/36 functions compile due to parenthesis imbalance
- Frameset mode is the recommended interface for persistent audio

Files modified:
- asteroid.lisp: Add cache-control headers
- parenscript/player.lisp: Fix == operators, fix redirect-when-frame
- template/*-content.ctml: Add AJAX navigation and interval cleanup
- template/status-content.ctml: Created placeholder
- parenscript/spectrum-analyzer.lisp: Fix re-initialization
2025-12-07 09:40:25 +03:00
Glenn Thompson ca07b6e670 Fix player page now playing updates and spectrum analyzer MUTED indicator
- Execute scripts after AJAX navigation to enable dynamic content updates
- Fix spectrum analyzer audio element reference across navigation
- Stop and restart spectrum analyzer when re-initializing after AJAX load
- Find audio element in parent frame for frameset mode
- Clear all intervals/timeouts before navigation to prevent errors
- Add status-content.ctml placeholder page
- Remove debug logging from spectrum analyzer

Fixes:
- Now playing panel updates on player page after navigation
- MUTED indicator appears correctly across all pages
- No console errors from abandoned intervals
- Clean resource cleanup on page transitions
2025-12-07 08:21:00 +03:00
Glenn Thompson 2fa03e447a Update dropdown colors to match spectrum analyzer theme
- Dropdown boxes now dynamically update their text and border colors to match selected theme
- Prevents color clashing between UI elements and spectrum analyzer
- Colors update both on theme change and on page load
2025-12-06 11:55:24 -05:00
Glenn Thompson c08b5f73de Add monotone theme and dynamic border color
- Add monotone theme with deep blue to cobalt gradient
- Update canvas border color dynamically to match selected theme
- Set initial border color on page load based on saved preference
2025-12-06 11:55:24 -05:00
Glenn Thompson 51387bddba Add spectrum analyzer theming and visualization styles
- Add 6 color themes: green, blue, purple, red, amber, rainbow
- Add 3 visualization styles: bars, wave, dots
- Add UI controls (dropdowns) to change theme and style
- Persist user preferences in localStorage
- Remove debug logging from parenscript serving and Icecast stats
- Fix dots visualization with proper Math.PI handling
2025-12-06 11:55:24 -05:00
Glenn Thompson b6be0ebab1 feat: Convert JavaScript to Parenscript with stream fixes and UX improvements
Major Changes:
- Convert all JavaScript files to Parenscript for better maintainability
- Move spectrum-analyzer to parenscript/ directory structure
- Add parenscript-utils.lisp for shared utilities
- Convert admin.js, player.js, front-page.js, auth-ui.js to Parenscript
- Convert profile.js, users.js, recently-played.js to Parenscript

Stream Reconnect Fixes (from merged PR):
- Add reset-spectrum-analyzer function to properly clean up Web Audio API
- Implement reconnect logic for pauses longer than 10 seconds
- Detect stale audio in 'playing' event and force stream reconnection
- Prevent 'Now Playing' updates while stream is paused
- Reduce reconnect delay to 200ms for faster response
- Add proper spectrum analyzer reset/reinit during reconnection

UX Improvements:
- Change live indicator from blink to smooth pulse (2s ease-in-out)
- Pulse animation like old PowerBook/MacBook sleep indicator
- Add MUTED indicator to spectrum analyzer when audio is muted
- Spectrum continues to flow even when muted (data still streaming)
- Red 'MUTED' text displayed in top-right corner of canvas

Technical Details:
- Parenscript files generate JavaScript via API endpoints
- All player modes updated: main player, front page, popout, frame player
- Improved audio context handling to only create once per element
- Added comprehensive error handling and logging
- Updated asteroid.asd to include parenscript module structure

Documentation:
- Updated all documentation dates to 2025-12-06
- Added PARENSCRIPT-EXPERIMENT.org documenting the conversion
- Updated PROJECT-HISTORY.org with Phase 9 (Visual Audio Features)
- Added comprehensive project statistics (408 commits, 9,300 LOC)

This conversion improves code maintainability by using Lisp throughout
the stack and makes it easier to share code between frontend and backend.
2025-12-06 11:55:24 -05:00
Glenn Thompson 7c7b2c921e fix: Prevent stale audio playback after long pause and reorganize spectrum analyzer
- Detect pauses longer than 10 seconds across all player modes
- Intercept 'playing' event to stop stale buffered audio
- Force stream reconnect to get live audio after long pause
- Reset and reinitialize spectrum analyzer during reconnect
- Prevent 'Now Playing' updates while stream is paused
- Move spectrum-analyzer.lisp to parenscript/ directory
- Update all documentation dates to 2025-12-06
- Add comprehensive project statistics (408 commits, 9,300 LOC)
- Add Phase 9 (Visual Audio Features) to project history

Fixes issue where resuming playback after a long pause would play
old buffered audio instead of the current live stream. The fix uses
the 'playing' event to detect when stale audio starts and immediately
stops it, then reconnects to get fresh stream data.

All player modes updated: main player, front page, popout, and frame player.
2025-12-06 08:36:30 -05:00