Replace backend proxy streaming endpoint with direct access to
Sonauto's public streaming URL (api-stream.sonauto.ai). This
simplifies the architecture and reduces latency.
- Update waiting.php to use task_id from status API response
- Add autoplay attribute to audio element per Sonauto docs
- Remove stream.py proxy router (no longer needed)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Stream endpoint:
- Increase read timeout to 600s for progressive audio generation
- Use larger 16KB chunks for smoother playback
- Remove misleading Accept-Ranges header (we don't support range requests)
- Add logging for stream start/completion
- Properly close httpx client after streaming
Frontend:
- Wait for 'canplay' event before attempting autoplay
- Add event listeners for play, error, stalled, waiting
- Native audio controls' play button now properly hides tap message
- Add 5s fallback timeout if canplay doesn't fire
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enable users to listen to their song while video generation continues
in the background. Backend proxies authenticated Sonauto stream API
since HTML audio elements cannot send auth headers.
- Add streaming_ready_at column to track when stream becomes available
- Enable streaming in Sonauto API request payload
- Handle GENERATING_STREAMING_READY webhook status
- Add /api/stream/{session_id} proxy endpoint using httpx
- Update StatusResponse with streaming_ready and task_id fields
- Add audio player UI with autoplay fallback for mobile
- Fade out audio gracefully before redirect to result page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Python/FastAPI backend with Celery workers
- Add video generation with FFmpeg (spinning record animation)
- Add API endpoints: submissions, status polling, webhook, results
- Add database schema and Alembic migrations
- Update frontend pages with API integration
- Add project documentation and spec
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>