You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React integrations using @cap/sdk-recorder/react cannot enforce a custom recording length with maxDurationMs. useCapRecorder() accepts RecorderOptions but drops this field when creating CapRecorder, so it schedules the default four-hour deadline instead.
Expected: a recording configured with maxDurationMs: 1500 automatically stops after approximately 1.5 seconds.
Actual: it is still recording after 2.4 seconds and requires a manual stop. Passing the same options directly to new CapRecorder() correctly stops at 1.5 seconds. This affects integrations that need short, bounded recordings.
Reproduction
Mount a React component using the exported hook with these options:
Call await recorder.start() from a user interaction and allow camera capture.
Observe recorder.phase after 2.4 seconds. It remains recording instead of stopping at the configured deadline. Call recorder.stop() to end the reproduction.
SDK version: source package 0.1.0 on current main, b6a06a0a5d2f72f16862a3955ba0ba2a298ae1d7.
Verified with React 19.2.8 and Chrome 154 on Linux.
The controlled browser reproduction uses real React DOM, canvas capture, MediaRecorder and the SDK lifecycle. Device acquisition returns a synthetic canvas and upload requests are intercepted. Physical devices and cloud uploads were not tested.
The baseline schedules 14400000 ms. A focused patch forwarding the option schedules 1500 ms, stops the native recorder at approximately 1501 ms and releases all capture tracks. Saved VP9 recordings decode successfully with FFmpeg.
Public issue/PR searches, including comments on the original SDK PR #1639 and the open SDK testing PRs, found no report or active work covering this React option omission. The already-reported pause-duration accounting problem is separate.
Activity
linear commentedon Oct 20, 2026
CAP-856