The downloadJamTrack thunk was failing with "No mixdown package available"
because it was trying to access mixdowns[0].packageId directly. Mixdowns
have a packages array, and the correct package must be selected based on
client capabilities (pickMyPackage logic from legacy implementation).
Changes to downloadJamTrack thunk:
- Get client sample rate via jamClient.GetSampleRate()
- Find mixdown by mixdownId if provided, else use first mixdown
- Implement pickMyPackage logic to find compatible package:
* file_type === 'ogg'
* encrypt_type === 'jkz'
* sample_rate === clientSampleRate (44 or 48 kHz)
- Extract packageId from selected package
- Add detailed error messages for each failure case
This matches the legacy JamTrackStore.pickMyPackage() behavior documented
in .planning/codebase/JAMTRACK_LEGACY.md lines 126-130.
Fixes "No mixdown package available" error during JamTrack playback.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>