html5: Adds event required by BBB App when sharing screen#23923
html5: Adds event required by BBB App when sharing screen#23923antobinary merged 1 commit intobigbluebutton:v3.0.x-releasefrom
Conversation
Walkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as UI (Screenshare)
participant Bridge as KurentoScreenShareBridge
participant MobAPI as window.bbbMobileApp
participant Native as Native Layer
Note over UI,Native: New stop flow on screenshare end
UI->>Bridge: STOP()
Bridge-->>UI: stopped
UI->>MobAPI: onScreenshareStopRequest()? (if defined)
alt Mobile callback available
MobAPI->>Native: callNativeMethod('stopScreenShare')
Native-->>MobAPI: ack
else No mobile callback
Note over UI: No-op
end
sequenceDiagram
autonumber
participant UI as UI (Stop Control)
participant Global as window.bbbMobileScreenShareBroadcastFinishedCallback
participant Native as Native Layer
Note over UI,Native: Existing broadcast-finished hook (unchanged)
UI->>Global: invoke()
Global->>Native: handle broadcast finished
Native-->>Global: ack
sequenceDiagram
autonumber
participant UI as UI (Legacy)
participant Bridge as KurentoScreenShareBridge
participant Native as Native Layer
Note over UI,Native: Old vs New control path
rect rgba(200,200,255,0.15)
Note over UI,Native: Old (removed)
UI->>Bridge: STOP()
Bridge->>Native: (overridden) stopScreenShare
end
rect rgba(200,255,200,0.15)
Note over UI,Native: New
UI->>Bridge: STOP()
UI->>window.bbbMobileApp: onScreenshareStopRequest()
window.bbbMobileApp->>Native: stopScreenShare
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
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 |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/screenshare/service.js (1)
227-229: Prevent double-stop loops with native callback and handle the promise.Calling native stop may trigger
bbbMobileScreenShareBroadcastFinishedCallback, which clicks “stop” again. Add a one-shot guard and observe the promise.Apply:
- if (window.bbbMobileApp && window.bbbMobileApp.onScreenshareStopRequest) { - window.bbbMobileApp.onScreenshareStopRequest() - } + const maybeStop = window.bbbMobileApp?.onScreenshareStopRequest; + if (maybeStop && !window.bbbMobileApp.__stopRequestedByWeb) { + window.bbbMobileApp.__stopRequestedByWeb = true; + // Avoid unhandled rejection; clear guard afterward + Promise.resolve(maybeStop()).finally(() => { + delete window.bbbMobileApp.__stopRequestedByWeb; + }); + }Additionally (outside this hunk), consider guarding inside
window.bbbMobileScreenShareBroadcastFinishedCallback:if (window.bbbMobileApp?.__stopRequestedByWeb) { delete window.bbbMobileApp.__stopRequestedByWeb; return; // skip duplicate click if JS initiated stop } document.querySelector('[data-test="stopScreenShare"]')?.click();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
bigbluebutton-html5/imports/ui/components/screenshare/service.js(1 hunks)bigbluebutton-html5/imports/ui/services/mobile-app/index.js(1 hunks)
⏰ 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-html5)
Automated tests Summary✅ All the CI tests have passed! |
7d3b0ec
into
bigbluebutton:v3.0.x-release



Required for the new version of "BigBlueButton Tablet".
https://apps.apple.com/br/app/bigbluebutton-tablet/id1641156756