Repository navigation
[3.0 recording] fix: external video recording not shown after screenshare - #23987
Conversation
WalkthroughThe 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 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 (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)
🔇 Additional comments (1)
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.
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. Comment |
|
Automated tests Summary✅ All the CI tests have passed! |
Tainan404
left a comment
There was a problem hiding this comment.
Reviewed and tested the code
|
Thank you! |



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?).