Skip to content

[3.0 recording] fix: external video recording not shown after screenshare - #23987

Merged
antobinary merged 1 commit into
bigbluebutton:v3.0.x-developfrom
hiroshisuga:patch-18
May 5, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v3.0.x-developfrom
hiroshisuga:patch-18

Conversation

@hiroshisuga

Copy link
Copy Markdown
Contributor

What does this PR do?

Make a pair of external-video-start and external-video-stop events and remove unnecessary external-video-stop events.

Closes Issue(s)

Closes #23986

Motivation

From BBB3.0 or earlier, external-video-stop event is recorded whenever a screen share event happens. This brings unnecessary external-video-stop events and breaks the recording logic.
Another solution would be stopping to add external-video-stop event when it's not paired with external-video-start event (graphql issue?).

@coderabbitai

coderabbitai Bot commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The change updates the logic in record-and-playback/core/lib/recordandplayback/generators/events.rb for assembling external video events. Instead of returning a flat list of events sorted by timestamp, it now sorts events and builds a paired sequence: when encountering an event with external_video_url (Start), it includes it and then includes the immediately following event only if that next event does not also contain an external_video_url (Stop/next non-start). This yields a mixed, ordered list of Start/Stop (or next non-start) entries associated with external video playback.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor RP as Recording Processor
  participant SRC as Sorted Events
  participant GEN as Events Generator
  participant OUT as Paired Output

  RP->>GEN: Request external video events
  GEN->>SRC: Load events sorted by timestamp
  loop Iterate in order
    GEN->>GEN: Check event.has_external_video_url?
    alt Start event
      GEN->>OUT: Append Start event
      GEN->>GEN: Peek next event
      alt Next is non-start
        GEN->>OUT: Append next event (Stop/other)
      else Next is another start/missing
        GEN->>GEN: Skip pairing
      end
    else Non-start
      GEN->>GEN: Continue
    end
  end
  GEN-->>RP: Return paired Start/Stop sequence
  note over GEN,OUT: New/changed: pairing logic after sorting
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ramonlsouza
  • gustavotrott
  • gabriellpr

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and precisely describes the primary change of fixing external video recordings not appearing after a screenshare in the 3.0 recording logic, which aligns directly with the main goal of pairing external-video-start and -stop events and removing extraneous stop events. It is concise, specific, and provides enough context for team members to understand the purpose without listing file details or including unnecessary noise.
Linked Issues Check ✅ Passed The implementation updates the event generator logic to correctly pair external-video-start and -stop events and eliminate unmatched stop events that occurred after screenshares, directly addressing the behavior described in issue #23986. This change satisfies the coding requirements of ensuring the external video URL is shown when an external video follows a screenshare.
Out of Scope Changes Check ✅ Passed All modifications are confined to the record-and-playback event generator in events.rb to implement the pairing logic and removal of extraneous external-video-stop events, which directly relate to the linked issue and contain no unrelated changes.
Description Check ✅ Passed The description clearly explains that the PR pairs external-video-start and -stop events and removes unnecessary stop events, and it references the motivation and linked issue #23986. It is directly related to the changeset and provides sufficient context without straying off-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3976f79 and 6cf93ab.

📒 Files selected for processing (1)
  • record-and-playback/core/lib/recordandplayback/generators/events.rb (1 hunks)
🧰 Additional context used
🪛 RuboCop (1.80.2)
record-and-playback/core/lib/recordandplayback/generators/events.rb

[convention] 894-894: Space between { and | missing.

(Layout/SpaceInsideBlockBraces)


[convention] 894-894: Space missing inside }.

(Layout/SpaceInsideBlockBraces)


[convention] 897-897: Use next to skip iteration.

(Style/Next)


[convention] 899-899: Surrounding space missing for operator +.

(Layout/SpaceAroundOperators)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-package (bbb-playback-record)
🔇 Additional comments (1)
record-and-playback/core/lib/recordandplayback/generators/events.rb (1)

894-903: Good call filtering orphaned stop events.

Pairing a start only with the immediately following non-start event keeps stray StopExternalVideoRecordEvents (emitted on screenshare) from knocking the matcher out of sync, so the external video URL now survives the recording pipeline.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@antobinary antobinary added this to the Release 3.0 milestone Nov 28, 2025
@antobinary
antobinary changed the base branch from v3.0.x-release to v3.0.x-develop April 24, 2026 15:26
@ramonlsouza
ramonlsouza requested a review from Tainan404 April 24, 2026 16:34

@Tainan404 Tainan404 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested the code

@antobinary

Copy link
Copy Markdown
Member

Thank you!

@antobinary
antobinary merged commit 52829f5 into bigbluebutton:v3.0.x-develop May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.0] external video not recorded (URL not shown) after screenshare

3 participants