Repository navigation
fix: reintroduce meta_hack-record-viewer-video - #23366
antobinary merged 2 commits into
Conversation
WalkthroughThe changes introduce three new Boolean flags— Sequence Diagram(s)sequenceDiagram
participant User
participant CoreApp as Core Application
participant MsgBuilder as Message Builder
User->>CoreApp: Request recording status
CoreApp->>CoreApp: Determine recordUserAudio (hardcoded true)
CoreApp->>CoreApp: Determine recordUserScreenShare (hardcoded true)
CoreApp->>CoreApp: Lookup user metadata for bbb_record_video
CoreApp->>CoreApp: Check global hack-record-viewer-video setting
CoreApp->>CoreApp: Compute recordUserCameras based on role and settings
CoreApp->>MsgBuilder: buildGetRecordingStatusRespMsg(..., recordUserAudio, recordUserCameras, recordUserScreenShare)
MsgBuilder-->>CoreApp: GetRecordingStatusRespMsgBody with new flags
CoreApp-->>User: Send updated recording status response
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Metadata support was removed from the client and
meta_hack-record-viewer-video was removed alongside it. There are still
some users of that metaparam, so it needs to be reintroduced.
Extend the GetRecordingStatus server-side probe made between webrtc-sfu
and akka-apps so that it responds with media-specific recording consent
states for audio, cameras and screen sharing. Audio and screen sharing
are unimplemented right now (default to true), but cameras work as
follows:
- Factor meta_hack-record-viewer-video and userdata-bbb_record_video
into the consent resolution for the requester
- Respond with the appropriate consent state for cameras via the
recordUserCameras field.
Actually handling of these consent booleans is done by bbb-webrtc-sfu.
c6c71d2 to
cf8523f
Compare
v2.19.0-beta.2 --- * feat: add support for camera recording consent flag
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/GetRecordingStatusReqMsgHdlr.scala (2)
38-45: Complete the implementation for audio and screenshare recording consents.The comment indicates these features are not fully implemented, but they're hardcoded to
true. This could lead to unexpected behavior if clients rely on these flags.Would you like me to help implement the proper logic for
recordUserAudioandrecordUserScreenSharebased on user metadata, similar to howrecordUserCamerasis handled? I can open a new issue to track this task.
47-67: Consider refactoring for improved readability and maintainability.The logic for determining camera recording consent is complex with nested conditions. Also, the metadata key "hack-record-viewer-video" suggests this might be a temporary solution.
Consider extracting the logic into a separate method for better readability:
-val userOption = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId) -val recordVideoFromUserMetadata: Boolean = userOption - .flatMap(_.userMetadata.get("bbb_record_video")) - .map(_.toBoolean) - .getOrElse(true) - -val globalRecordViewerVideoSetting: Boolean = liveMeeting.props.metadataProp.metadata - .get("hack-record-viewer-video") - .map(_.toBoolean) - .getOrElse(true) -val recordViewerVideoFromUserMetadata: Boolean = userOption.map { user => - // Moderators always have recording permission unless explicitly disabled via userdata - if (user.role == Roles.MODERATOR_ROLE) { - true - } else { - // For non-moderators, use globalRecordViewerVideoSetting - globalRecordViewerVideoSetting - } -}.getOrElse(true) - -val recordUserCameras = recordVideoFromUserMetadata && recordViewerVideoFromUserMetadata +val recordUserCameras = calculateCameraRecordingConsent( + Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId), + liveMeeting.props.metadataProp.metadata +)Add this private method to the trait:
private def calculateCameraRecordingConsent( userOption: Option[User2x], meetingMetadata: Map[String, String] ): Boolean = { val userRecordVideoConsent = userOption .flatMap(_.userMetadata.get("bbb_record_video")) .map(_.toBoolean) .getOrElse(true) val globalViewerVideoSetting = meetingMetadata .get("hack-record-viewer-video") .map(_.toBoolean) .getOrElse(true) val viewerRecordConsent = userOption.map { user => user.role == Roles.MODERATOR_ROLE || globalViewerVideoSetting }.getOrElse(true) userRecordVideoConsent && viewerRecordConsent }Also, is the metadata key
"hack-record-viewer-video"intended to be permanent? The "hack" prefix suggests it's temporary.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/GetRecordingStatusReqMsgHdlr.scala(2 hunks)bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala(1 hunks)bbb-webrtc-sfu.placeholder.sh(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/GetRecordingStatusReqMsgHdlr.scala (1)
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (3)
GetRecordingStatusRespMsg(127-127)GetRecordingStatusRespMsg(128-128)GetRecordingStatusRespMsgBody(129-137)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: build-package (bbb-webrtc)
- GitHub Check: build-package (bbb-fsesl-akka)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-freeswitch)
- GitHub Check: build-package (bbb-graphql-server)
🔇 Additional comments (2)
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (1)
129-137:Details
❓ Verification inconclusive
API extension looks good, but verify backward compatibility.
The addition of the three new Boolean fields follows the existing naming convention and structure. However, this change breaks binary compatibility of the message format.
Run the following script to check if any external components or services consume this message type and might be affected by the API change:
🏁 Script executed:
#!/bin/bash # Description: Search for consumers of GetRecordingStatusRespMsg to assess impact # Look for direct usage of the message type rg -A 5 "GetRecordingStatusRespMsg" --type scala --type java # Look for pattern matching or field access on GetRecordingStatusRespMsgBody ast-grep --pattern 'GetRecordingStatusRespMsgBody($$$)' # Check for JSON serialization/deserialization of this message rg -A 3 "GetRecordingStatusRespMsgBody.*Json|Json.*GetRecordingStatusRespMsgBody"Length of output: 5320
Binary compatibility risk: newly added fields in GetRecordingStatusRespMsgBody
The addition of
recordUserAudio,recordUserCameras, andrecordUserScreenShareat the end of the case class preserves source compatibility but breaks binary compatibility. Our quick search shows only internal construction of this message in:
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala(new fields)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/GetRecordingStatusReqMsgHdlr.scala(updated constructor)We didn’t find any JSON serialization formats in this repo, so please manually verify:
- Any JSON (de)serializers or format implicits for
GetRecordingStatusRespMsgBodyare updated to include the new fields.- Downstream consumers (e.g., web clients, external services) can handle these added Booleans—consider providing defaults if needed.
bbb-webrtc-sfu.placeholder.sh (1)
3-3:Details
✅ Verification successful
Version update aligns with PR objectives.
The update to v2.19.0-beta.2 is consistent with the PR description stating that bbb-webrtc-sfu adds support for the camera recording consent flag.
Verify that this tag exists and contains the expected camera recording consent support:
🏁 Script executed:
#!/bin/bash # Description: Verify the bbb-webrtc-sfu version tag exists and check release notes # Check if the tag exists git ls-remote --tags https://github.com/bigbluebutton/bbb-webrtc-sfu | grep "v2.19.0-beta.2" # Get information about what changed between beta.1 and beta.2 curl -s https://api.github.com/repos/bigbluebutton/bbb-webrtc-sfu/compare/v2.19.0-beta.1...v2.19.0-beta.2 | jq -r '.commits[].commit.message' 2>/dev/null || echo "Failed to fetch comparison"Length of output: 437
Approved: v2.19.0-beta.2 bump includes camera recording consent support
- Verified that tag v2.19.0-beta.2 exists in the bbb-webrtc-sfu repo.
- Confirmed commit message “feat: add support for camera recording consent flag” is included.
No further changes required.
Automated tests Summary✅ All the CI tests have passed! |
antobinary
left a comment
There was a problem hiding this comment.
Tested, worked well for me!



What does this PR do?
meta_hack-record-viewer-video was removed alongside it. There are still
some users of that metaparam, so it needs to be reintroduced.
and akka-apps so that it responds with media-specific recording consent
states for audio, cameras and screen sharing. Audio and screen sharing
are unimplemented right now (default to true), but cameras work as
follows:
into the consent resolution for the requester
recordUserCameras field.
Closes Issue(s)
None