Repository navigation
fix(sdk-recorder): reset React state when replacing the recorder - #3387
Open
vedanth-jadhav wants to merge 1 commit into
Open
vedanth-jadhav wants to merge 1 commit into
vedanth-jadhav wants to merge 1 commit into
Conversation
Contributor
|
Someone is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing a
useCapRecorderkey, API base, user or camera creates a fresh idle recorder, but the hook currently keeps the previous recorder's phase, video ID and elapsed time. The UI can therefore keep showing an active or completed recording after its tracks have been destroyed.Initialize the hook state from each replacement recorder. Equivalent rerenders and max-duration-only updates retain the active capture.
Validation:
The small unsubscribe typing correction reuses the same registered callback for add/delete. It fixes an existing TS2345 exposed by importing the SDK source into the web test; the identical supporting hunk is also in #3380. This PR does not include that PR's upload ownership changes. No dependency or lockfile changes. Browser capture/storage are controlled in tests; physical devices were not exercised.


Confidence Score: 5/5
The PR appears safe to merge.Summary
useCapRecordernow resets its phase, video ID, and elapsed time when it installs a replacement recorder.No actionable issues found. Checks were based on source review; tests and physical devices were not run.
Reviews (1) · Last reviewed commit: "fix(sdk-recorder): reset React state whe..." · Reviewed by Greptile