Skip to content

test: stabilize recording screenshare transitions - #26009

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/recording-screenshare-camera-sync
Oct 15, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/recording-screenshare-camera-sync

Conversation

@imdt-claudiop

@imdt-claudiop imdt-claudiop commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The recording regression tests added in PR bigbluebutton/bigbluebutton#25991 can start screensharing before the final 200% zoom reaches viewers. This addresses the intermittent failures Anton reported in the CI test channel.

Wait for the presenter's camera to settle at 200% and reach a viewer on x/y/z before starting screenshare, then keep the share active for three seconds before stopping it, including after a presentation upload. In CI run 37794713021 a share that lasted about 250 ms left no screenshare slide in the recording, and the failing local run recorded only 0.2 s of it; three seconds keeps the share well above the recording's 0.1 s event resolution. Existing recording assertions and production code are unchanged.

Validation

Chromium, 10 repetitions per case, two workers, no retries (passed runs):

Scenario Original, bbb-webrtc-sfu Fixed, bbb-webrtc-sfu Fixed, LiveKit (MEDIA_BRIDGE unset)
Keep presentation 9/10 10/10 10/10
Switch presentation 10/10 10/10 10/10

Locally only the keep case failed (1 of 10); the switch case passed 10/10 unfixed, so its failure evidence is CI run 37794713021, where the 200% zoom was recorded only after the screenshare had started.
The local baseline failed the horizontal-position assertion: its pre-share camera was approximately 1280x720, while the restored camera was 960x540. All 40 fixed recordings contain the final 960x540 camera before screenshare, a distinct screenshare interval, and the expected restored/reset camera. Both cases also passed once per bridge after rebasing (4/4).

Baseline runner: Node 20; fixed runs and static checks: Node 24. Typecheck and ESLint/Prettier on the changed file pass. Full-suite lint still reports the same 234 pre-existing errors; the formatting check reports 25 pre-existing files.

Evidence

Original test sequence. Its failure is established by the recording XML comparison above.

Click the preview for the full corrected sequence:

Recording screenshare transition

MP4 timestamps: 00:14, presentation at 200%; 00:21, screenshare active; 00:27, presentation restored.

Client timing limitation

A zoom made right before starting a screenshare is sent only after the 200ms zoom debounce and the camera animation finish, so it can reach the server, viewers and the recording after the screenshare has already started. This is client timing and out of scope here.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c182731-7d1f-47b9-8afd-513d382c703a
📥 Commits

Reviewing files that changed from the base of the PR and between 28bf534 and 9ebbd38.

📒 Files selected for processing (1)
  • bigbluebutton-tests/playwright/recording/recording.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

The recording test captures the presenter camera before zooming the presentation to 200%. It waits for the presenter camera zoom to settle, then checks that the viewer camera matches its coordinates and zoom within specified tolerances. After screenshare starts and any optional presentation upload completes, the test waits three seconds before stopping screenshare.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: guiibecker

Merge Risk: ⚪ Minimal · up to 9ebbd

The recording-test timing change appears mergeable after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: stabilizing recording tests for screenshare transitions.
Description check ✅ Passed The description directly explains the intermittent recording test failures, the timing changes, validation results, and scope of the fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@imdt-claudiop
imdt-claudiop marked this pull request as ready for review October 8, 2026 19:50
@antobinary antobinary added this to the Release 4.0 milestone Oct 8, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Automated tests have passed!

@antobinary
antobinary merged commit 578af34 into bigbluebutton:v4.0.x-develop Oct 15, 2026
60 of 61 checks passed
@antobinary

Copy link
Copy Markdown
Member

I opened #26080 for the recording side of this.

With this PR the test waits for the 200% zoom before starting the screenshare, so the zoom is recorded before the share and the test passes on the bbb-webrtc-sfu bridge. That is the case publish/presentation.rb handles correctly. When a zoom reaches the server during a screenshare, the script (since #25991 / #25992) takes the screenshare's 1280x720 as the zoom's reference size and multiplies the restored offsets by 1920 / 1280, so the playback shows the slide shifted after the share. That was the -540 -304 viewBox (instead of -360 -202) in the earlier legacy-media failures on #26006, #26016 and #26048. It still reproduces on v4.0.x-develop with this PR included, and the test no longer covers that case, so #26080 asks for a fix in presentation.rb plus a test where the zoom arrives during the screenshare.

One thing about the new wait here: initialCamera is read right after the recording starts. In 2 of 6 local runs on the bbb-webrtc-sfu bridge that was before the slide had been fitted (camera z 1.0 instead of about 0.68), so the poll waited for z 2.0 while 200% is about 1.36 and the test failed with "the presenter camera should reach the final 200% zoom". Reading the starting camera once the slide is fitted would avoid that.

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.

3 participants