Repository navigation
fix(sdk-recorder): retain microphone audio when sharing tab sound - #2727
Merged
richiemcilroy merged 3 commits intoOct 20, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
AksharP5
force-pushed
the
fix/sdk-tab-microphone-audio
branch
from
October 20, 2026 02:23
998b7b3 to
fa64a45
Compare
Contributor
Author
|
@greptileai please re-review fa64a45. Both findings have fixes and regression coverage. Audio startup now has a ten-second deadline with capture cleanup, and the mix reserves headroom for each input. The PR description includes fresh browser encoding, loud-input and stalled-startup checks. All seven package tests pass. |
This branch was previously 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.
SDK users sharing tab audio could lose microphone narration even though recording and upload succeeded. This mixes the captured audio sources into one MediaRecorder track and releases the mixer with the capture streams. Each input gets an equal share of the output range, and audio startup rejects after ten seconds if the browser leaves it pending. Single-source recordings keep their direct track path and original level.
Closes #2726
Before and after
Same SDK flow and Chrome 154/Linux environment, with a moving canvas and two synthetic tones, each at input amplitude 0.2. The SDK records for three seconds, stops, and runs its multipart client against local request stubs. These measurements come from decoded recordings.
94a99fc1bcomplete, narration lostcomplete, both sources retainedThe two-source mix deliberately uses gain 0.5 to leave headroom for both inputs. Independent FFmpeg decoding of the saved VP9/Opus WebM files confirms that both sources survive. The microphone tone is 76.36 dB below the tab tone before, and within 0.04 dB of it after.
Validation
bun run --cwd packages/sdk-recorder test: seven tests pass, covering the shared recording track, mixing headroom, zero/single-source capture, startup timeout, and cleanup after encoder or audio startup failure. Uses the existing Bun runtime without adding dependencies.destroy()checks release the source tracks and close the mixer.resume()leaves the initial PR head capturing at 10.5 seconds. The updated code rejects at 10.0 seconds, stops all captured tracks, closes the mixer, and clears its deadline.git diff --check, strict TypeScript checking of the capture module, and a browser bundle build pass.src/index.ts:87on main and this patch. No unrelated type changes are included. Full workspace checks were not run locally.Capture inputs and upload requests were stubbed for the browser test. Physical microphones, the native tab picker, Firefox, Safari and cloud services remain unverified. The dashboard recorder and its separate mixer are unchanged.


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are fixed.Summary
The SDK now combines tab sound and microphone audio into one recording track.
RecorderEventMapfirst.Reviews (2) · Last reviewed commit: "fix(sdk-recorder): bound audio startup a..." · Reviewed by Greptile