Skip to content

update(recording): add LayoutBroadcastedRecordEvent to events.xml - #24254

Merged
antobinary merged 2 commits into
bigbluebutton:v3.0.x-releasefrom
germanocaumo:layout-broadcasted-record-event
Nov 27, 2025
Merged

antobinary merged 2 commits into
bigbluebutton:v3.0.x-releasefrom
germanocaumo:layout-broadcasted-record-event

Conversation

@germanocaumo

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the info about layout when presenter changes something with push layout enabled (BroadcastLayoutEvtMsg):

  <event timestamp="677408846" module="PARTICIPANT" eventname="LayoutBroadcastedEvent">
    <focusedCamera>none</focusedCamera>
    <presentationVideoRate>0.0</presentationVideoRate>
    <cameraPosition>contentTop</cameraPosition>
    <presentationIsOpen>false</presentationIsOpen>
    <layout>CUSTOM_LAYOUT</layout>
    <timestampUTC>1763562184363</timestampUTC>
    <date>2025-11-19T11:23:04.363-03</date>
    <isResizing>false</isResizing>
  </event>

Motivation

No info in recording scripts about presentation global state during meeting.

How to test

  1. Start a meeting
  2. Enable Update to everyone in layout settings
  3. Minimize/resetore presentation
  4. End meeting
  5. Check generated events.xml file for the new event

Adds the info about layout when presenter changes something with push layout enabled (BroadcastLayoutEvtMsg):

  <event timestamp="677408846" module="PARTICIPANT" eventname="LayoutBroadcastedEvent">
    <focusedCamera>none</focusedCamera>
    <presentationVideoRate>0.0</presentationVideoRate>
    <cameraPosition>contentTop</cameraPosition>
    <presentationIsOpen>false</presentationIsOpen>
    <layout>CUSTOM_LAYOUT</layout>
    <timestampUTC>1763562184363</timestampUTC>
    <date>2025-11-19T11:23:04.363-03</date>
    <isResizing>false</isResizing>
  </event>
@coderabbitai

coderabbitai Bot commented Nov 19, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This change adds recording support for layout broadcast events. A new Scala event class, LayoutBroadcastedRecordEvent, was introduced with setters for layout, presentationIsOpen, isResizing, cameraPosition, focusedCamera, and presentationVideoRate, and associated key constants in its companion object. RedisRecorderActor was extended to handle BroadcastLayoutEvtMsg by adding a dispatch case and a private handler handleBroadcastLayoutEvtMsg that builds and populates a LayoutBroadcastedRecordEvent from the message body and records it using the meetingId from the message header.

Sequence Diagram

sequenceDiagram
    participant Sender
    participant RedisRecorderActor
    participant LayoutBroadcastedRecordEvent
    participant RecordingMechanism

    Sender->>RedisRecorderActor: BroadcastLayoutEvtMsg
    activate RedisRecorderActor
    RedisRecorderActor->>RedisRecorderActor: match BroadcastLayoutEvtMsg
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: create event
    activate LayoutBroadcastedRecordEvent
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setLayout(...)
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setPresentationIsOpen(...)
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setIsResizing(...)
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setCameraPosition(...)
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setFocusedCamera(...)
    RedisRecorderActor->>LayoutBroadcastedRecordEvent: setPresentationVideoRate(...)
    deactivate LayoutBroadcastedRecordEvent
    RedisRecorderActor->>RecordingMechanism: record(event, meetingId)
    deactivate RedisRecorderActor
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify mapping from msg.body to event setters in handleBroadcastLayoutEvtMsg
  • Confirm boolean fields are consistently converted to "true"/"false" strings
  • Check companion object constants match keys used in the event map
  • Ensure the new handler follows existing error-handling and null-checking patterns in RedisRecorderActor

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'add LayoutBroadcastedRecordEvent to events.xml', but the actual changeset adds a new Scala event class and integrates it into the Redis recorder actor—not directly to events.xml. Update the title to accurately reflect the main changes, such as 'feat(recording): add LayoutBroadcastedRecordEvent class and recording handler' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the purpose, provides a concrete example of the recorded event, and includes testing instructions relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • 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 4c38353 and 76ac878.

📒 Files selected for processing (1)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala
⏰ 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-apps-akka)

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.

@kepstin

kepstin commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

I understand the presentationIsOpen field, but can I get a description of what the remaining fields mean, and what the possible values are for the enumerated fields?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbe5b50 and 4c38353.

📒 Files selected for processing (2)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/LayoutBroadcastedRecordEvent.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-10T12:15:03.265Z
Learnt from: jaapjansma
Repo: bigbluebutton/bigbluebutton PR: 21204
File: bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala:21-21
Timestamp: 2024-10-10T12:15:03.265Z
Learning: When reviewing code changes in BigBlueButton, particularly in case classes like `RegisterUser` in `MeetingsManagerActor.scala`, ensure to accurately distinguish between added parameters and replaced parameters to avoid incorrect assessments.

Applied to files:

  • akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala
🧬 Code graph analysis (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/LayoutBroadcastedRecordEvent.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (1)
  • record (48-50)
akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/LayoutBroadcastedRecordEvent.scala (6)
  • setLayout (27-29)
  • setPresentationIsOpen (31-33)
  • setIsResizing (35-37)
  • setCameraPosition (39-41)
  • setFocusedCamera (43-45)
  • setPresentationVideoRate (47-49)
⏰ 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-apps-akka)
🔇 Additional comments (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/LayoutBroadcastedRecordEvent.scala (1)

22-60: LGTM! Clean implementation of the layout broadcast event class.

The event class is well-structured with appropriate setter methods and companion object constants. All type conversions (Boolean and Double to String) are handled correctly, and the event name matches the expected XML output shown in the PR description.

akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (1)

129-129: LGTM! Dispatch case properly added.

The BroadcastLayoutEvtMsg case is correctly positioned in the pattern matching block alongside other meeting-related event handlers.

@kepstin

kepstin commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Please update docs/docs/development/recording.md with the new event.

@antobinary
antobinary requested a review from kepstin November 19, 2025 16:17
@antobinary antobinary added this to the Release 3.0 milestone Nov 19, 2025
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

🚨 Test workflow has failed


Click here to check the action test reports (to view the report locally, see the docs)

@antobinary
antobinary merged commit 2262eeb into bigbluebutton:v3.0.x-release Nov 27, 2025
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