---
phase: 24-fix-recording-crash
plan: 01
subsystem: ui
tags: [recording, jam-client, c++, react-hooks]

# Dependency graph
requires:
  - phase: none
    provides: existing recording infrastructure
provides:
  - Correct jamClient.StartRecording and StopRecording method calls
  - Unpacked parameters matching C++ client expectations
  - Recording start/stop that matches legacy recordingModel.js pattern
affects: [phase-25-verify-controls, phase-26-memory-audit]

# Tech tracking
tech-stack:
  added: []
  patterns: ["jamClient method calls with unpacked parameters"]

key-files:
  created: []
  modified:
    - jam-ui/src/hooks/useRecordingHelpers.js
    - jam-ui/src/components/client/JKSessionScreen.js

key-decisions:
  - "Unpack recordSettings object to individual parameters for C++ client compatibility"
  - "Use videoType integer (not boolean recordVideo) as first param for StartRecording"
  - "Match legacy recordingModel.js signature exactly: (id, tracks, videoType, chatFlag, framerate)"

patterns-established:
  - "jamClient recording calls: Always unpack parameters, never pass objects to C++ client"

# Metrics
duration: 8min
completed: 2026-02-19
---

# Phase 24 Plan 01: Fix Recording Crash Summary

**Corrected jamClient recording method names and parameter format to match C++ client expectations**

## Performance

- **Duration:** 8 min
- **Started:** 2026-02-19
- **Completed:** 2026-02-19
- **Tasks:** 2
- **Files modified:** 2

## Accomplishments
- Fixed `StartMediaRecording` to `StartRecording` with unpacked parameters
- Fixed `FrontStopRecording` to `StopRecording` with correct signature
- Matched legacy recordingModel.js pattern exactly for C++ client compatibility

## Task Commits

Each task was committed atomically:

1. **Task 1: Fix useRecordingHelpers.js method names and parameters** - `45aeb04eb` (fix)
2. **Task 2: Fix JKSessionScreen.js doStartRecording method** - `660264312` (fix)

## Files Created/Modified
- `jam-ui/src/hooks/useRecordingHelpers.js` - Updated StartRecording and StopRecording calls with unpacked parameters
- `jam-ui/src/components/client/JKSessionScreen.js` - Updated doStartRecording to use correct method and parameters

## Decisions Made
- Unpack `recordSettings` object to individual parameters (`videoType`, `recordChat`, `recordFramerate`)
- Use integer values: `videoType || 0`, `recordChat ? 1 : 0`, `recordFramerate = 0`
- Match legacy signature exactly: `jamClient.StartRecording(id, groupedTracks, recordVideo, recordChat, recordFramerate)`

## Deviations from Plan

None - plan executed exactly as written.

## Issues Encountered
- Build verification skipped due to Node.js v23 OpenSSL incompatibility (environment issue, not code issue)
- Syntax validation passed via `node --check`

## User Setup Required

None - no external service configuration required.

## Next Phase Readiness
- Recording method calls now match legacy implementation
- Ready for Phase 25: Verify Basic Controls (manual verification with C++ client)
- C++ client should now receive correct method names and parameter format

---
*Phase: 24-fix-recording-crash*
*Completed: 2026-02-19*
