Skip to content

Form screen recording: respect the Microphone setting, mic off by default (#229336) - #224

Merged
floooat merged 4 commits into
masterfrom
form-recording-mic-setting
Nov 18, 2026
Merged

floooat merged 4 commits into
masterfrom
form-recording-mic-setting

Conversation

@floooat

@floooat floooat commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The feedback form's Record screen (GleapScreenRecorder) ignored Developer options → Microphone (flowConfig.capture.allowMicrophone) and started with the microphone on, so every recording called getUserMedia({ audio }). On a site that already holds microphone permission (for example a calling app), the browser grants that without a prompt, and the recording had sound even though the project had the microphone off. Only capture requests (GleapCaptureManager.micState) checked the setting.

Gleap ticket #229336: https://app.gleap.io/projects/613b5dd730aed737108f87ab/bugs/6afd9df1768dffc58cb92c62

Fix

  • The recorder asks for the microphone only when allowMicrophone === true and the browser has getUserMedia. The setting is read on every use, not cached when the form opens.
  • With the setting on, the microphone is opt-in: off until the user turns it on, the same as capture requests.
  • The toolbar's mic button is hidden when the setting is off, and also during a recording that started without the microphone (it can't be added mid-recording). It comes back for the next recording. Before, these cases showed an inactive button with the "browserNotSupported" tooltip.
  • The mic button's rendering moves from GleapMarkerManager.js (already over the size limit) to the new GleapScreenRecorderMicButton.js, with MIC_BUTTON as frozen constants. The tooltip is now set with textContent instead of innerHTML.

Behaviour change: please confirm

AGENTS.md says a missing setting keeps today's behaviour. Here it doesn't: a project that never touched Microphone (missing means off, as the dashboard shows it) no longer gets sound in form recordings, and with the setting on the microphone starts muted. Sites on latest get this with the merge. This is deliberate. The dashboard already shows the setting as off, and recording sound the project turned off is a privacy bug. Still, it changes what customers get today, so it needs a product yes before merging.

Tests

  • Tests first, in their own commit (3fc2c5c), seen failing against master. Two existing tests in GleapScreenRecorder.test.js changed because the required default changed: they started with the microphone on. The DisplayRecording mock now returns a microphone track only when one was asked for, like the real engine.
  • New: GleapScreenRecorderMicButton.test.js (jsdom) for the button states.
  • npx vitest related src/GleapScreenRecorder.js src/GleapMarkerManager.js src/GleapScreenRecorderMicButton.js --run: 25 files, 419 tests pass.
  • node tools/quality/check.mjs: 0 problems, 0 warnings.
  • Not run: npm run build / npm run test:smoke (no public API, load-time or build change; CI runs both). Not checked in a real browser.

Notes

  • This branch was first opened before master moved to Vitest. It was redone on top of master, and the merge commit 177bd62 brings that version over the first commit without a force-push. The diff against master is only the five files above.
  • No CHANGELOG.md entry yet: it goes in with the release that ships this.

🤖 Generated with Claude Code

floooat and others added 4 commits November 18, 2026 14:44
…ault (#229336)

The feedback form's "Record screen" (GleapScreenRecorder) ignored
Developer options → Microphone (flowConfig.capture.allowMicrophone) and
started with the microphone on, so it called getUserMedia on every
recording. On a site that already holds microphone permission the browser
grants that without a prompt, and the recording had sound although the
project had the microphone off. Only capture requests checked the setting.

- The recorder asks for the microphone only when allowMicrophone is true
  and the browser has getUserMedia, read on every use.
- With the setting on, the microphone is opt-in: off until the user turns
  it on, like capture requests.
- The toolbar's mic button is hidden when the setting is off, and for a
  recording that started without the microphone (it can't be added then);
  it comes back for the next recording.

Gleap ticket: https://app.gleap.io/projects/613b5dd730aed737108f87ab/bugs/6afd9df1768dffc58cb92c62

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roject allows it

Developer options → Microphone (flowConfig.capture.allowMicrophone)
decides whether the feedback form's "Record screen" may ask for the
microphone, and with it on the microphone is off until the user turns it
on, like capture requests. Two existing tests change because that default
changes: they started with the microphone on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… off by default

The feedback form's "Record screen" ignored Developer options →
Microphone (flowConfig.capture.allowMicrophone) and started with the
microphone on, so every recording called getUserMedia. On a site that
already holds microphone permission the browser grants that without a
prompt, and the recording had sound although the project had the
microphone off. Only capture requests checked the setting.

- The recorder asks for the microphone only when allowMicrophone is true
  and the browser has getUserMedia, read on every use.
- With the setting on, the microphone is off until the user turns it on,
  like capture requests.
- The toolbar's mic button is hidden when the setting is off, and for a
  recording that started without the microphone (it can't be added
  then); it is back for the next recording. Its rendering moves to
  GleapScreenRecorderMicButton.js, and the tooltip is set as text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@floooat
floooat merged commit 37c76d3 into master Nov 18, 2026
2 checks passed
@floooat floooat mentioned this pull request Nov 18, 2026
@TobiasDuelli
TobiasDuelli deleted the form-recording-mic-setting branch November 18, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants