Repository navigation
feat(layout): hide presentation according to layout.xml new events - #331
Merged
Merged
Conversation
This adds support to the new event saying when the presenter minimized the presentation. When found it: - Hides presentation (and thumbnails) completely - Make the webcams occupy the main area - Expands chat/notes to full left side (like it is when single content)
…entation Fixes some bugs mainly when seeking into/out minimized presentation.
fixes duplicated presentation/screenshare thumbnails in some cases
germanocaumo
force-pushed
the
hide-presentation
branch
from
February 25, 2026 21:34
b19ab00 to
08ba10f
Compare
12 of 17 tasks
kepstin
approved these changes
May 5, 2026
This was referenced May 8, 2026
germanocaumo
added a commit
to germanocaumo/bbb-playback
that referenced
this pull request
Jul 29, 2026
A recording whose layout.xml carries no show_screenshare event at or before a screenshare plays back with a blank content area for the whole duration of that screenshare: the screenshare layer stays display: none while the presentation renders the transparent presentation/deskshare.png placeholder. layout.xml was introduced by process_swap_events in BBB 3.0.2, so recordings processed by anything earlier — every 2.x recording, plus 3.0.0 and 3.0.1 — have no such file, and every screenshare in them is affected. From 3.0.2 on, starting a screenshare records a SetScreenshareAsContentEvent by itself: screenshareAsContent starts out false and the first share flips it to true, so no quick swap is needed. Those recordings carry an event at or before the screenshare and are unaffected. The event and the file arrived in the same commit, so 3.0.2 is an exact boundary. 3.0.27 later replaced process_swap_events with get_layout_events, which seeds a complete layout state at timestamp 0. bigbluebutton#331 replaced isShowScreenshareAsContent with getLayoutEvent and dropped its `if (isEmpty(data)) return true` fallback, so a missing event now resolves to showScreenshare: false instead of falling back to the screenshare state. validators.js: - Add getLayoutSwap, resolving showPresentation and showScreenshare from the most recent event carrying each property. When a property has no event, fall back to the behaviour these recordings were played back with: the presentation is visible and the screenshare is the content while it is being shared - Forward the property argument of getMostRecentEvent through getLayoutEvent. It has been accepted but unused since bigbluebutton#331; each layout property changes independently, and pre-3.0.27 files carry show_screenshare only, so reading both from a single most recent event would let an event that only changes the presentation reset the screenshare state - Use Object.hasOwn rather than hasProperty in that filter. A missing property is the expected case here, and hasProperty logs a warning on every miss, which would be emitted at the time update rate hooks/index.js: - Derive the initial state of useCurrentContent and useLayoutSwap from timestamp 0. This is hardening, not part of the fix above: the first render otherwise reports the presentation as the content even for a recording that starts on a screenshare, and only corrects itself on the first time update. Verified that it is not the cause of the blank layer — video.js recovers when its container is unhidden, which is why <Screenshare> is kept mounted under display: none rather than conditionally rendered Fixes bigbluebutton#363
germanocaumo
added a commit
to germanocaumo/bbb-playback
that referenced
this pull request
Jul 29, 2026
A recording whose layout.xml carries no show_screenshare event at or before a screenshare plays back with a blank content area for the whole duration of that screenshare: the screenshare layer stays display: none while the presentation renders the transparent presentation/deskshare.png placeholder. layout.xml was introduced by process_swap_events in BBB 3.0.2, so recordings processed by anything earlier — every 2.x recording, plus 3.0.0 and 3.0.1 — have no such file, and every screenshare in them is affected. From 3.0.2 on, starting a screenshare records a SetScreenshareAsContentEvent by itself: screenshareAsContent starts out false and the first share flips it to true, so no quick swap is needed. Those recordings carry an event at or before the screenshare and are unaffected. The event and the file arrived in the same commit, so 3.0.2 is an exact boundary. 3.0.27 later replaced process_swap_events with get_layout_events, which seeds a complete layout state at timestamp 0. bigbluebutton#331 replaced isShowScreenshareAsContent with getLayoutEvent and dropped its `if (isEmpty(data)) return true` fallback, so a missing event now resolves to showScreenshare: false instead of falling back to the screenshare state. validators.js: - Add getLayoutSwap, resolving showPresentation and showScreenshare from the most recent event carrying each property. When a property has no event, fall back to the behaviour these recordings were played back with: the presentation is visible and the screenshare is the content while it is being shared - Forward the property argument of getMostRecentEvent through getLayoutEvent. It has been accepted but unused since bigbluebutton#331; each layout property changes independently, and pre-3.0.27 files carry show_screenshare only, so reading both from a single most recent event would let an event that only changes the presentation reset the screenshare state - Use Object.hasOwn rather than hasProperty in that filter. A missing property is the expected case here, and hasProperty logs a warning on every miss, which would be emitted at the time update rate hooks/index.js: - Derive the initial state of useCurrentContent and useLayoutSwap from timestamp 0. This is hardening, not part of the fix above: the first render otherwise reports the presentation as the content even for a recording that starts on a screenshare, and only corrects itself on the first time update. Verified that it is not the cause of the blank layer — video.js recovers when its container is unhidden, which is why <Screenshare> is kept mounted under display: none rather than conditionally rendered Fixes bigbluebutton#363
antobinary
pushed a commit
that referenced
this pull request
Aug 5, 2026
…#366) A recording whose layout.xml carries no show_screenshare event at or before a screenshare plays back with a blank content area for the whole duration of that screenshare: the screenshare layer stays display: none while the presentation renders the transparent presentation/deskshare.png placeholder. layout.xml was introduced by process_swap_events in BBB 3.0.2, so recordings processed by anything earlier — every 2.x recording, plus 3.0.0 and 3.0.1 — have no such file, and every screenshare in them is affected. From 3.0.2 on, starting a screenshare records a SetScreenshareAsContentEvent by itself: screenshareAsContent starts out false and the first share flips it to true, so no quick swap is needed. Those recordings carry an event at or before the screenshare and are unaffected. The event and the file arrived in the same commit, so 3.0.2 is an exact boundary. 3.0.27 later replaced process_swap_events with get_layout_events, which seeds a complete layout state at timestamp 0. #331 replaced isShowScreenshareAsContent with getLayoutEvent and dropped its `if (isEmpty(data)) return true` fallback, so a missing event now resolves to showScreenshare: false instead of falling back to the screenshare state. validators.js: - Add getLayoutSwap, resolving showPresentation and showScreenshare from the most recent event carrying each property. When a property has no event, fall back to the behaviour these recordings were played back with: the presentation is visible and the screenshare is the content while it is being shared - Forward the property argument of getMostRecentEvent through getLayoutEvent. It has been accepted but unused since #331; each layout property changes independently, and pre-3.0.27 files carry show_screenshare only, so reading both from a single most recent event would let an event that only changes the presentation reset the screenshare state - Use Object.hasOwn rather than hasProperty in that filter. A missing property is the expected case here, and hasProperty logs a warning on every miss, which would be emitted at the time update rate hooks/index.js: - Derive the initial state of useCurrentContent and useLayoutSwap from timestamp 0. This is hardening, not part of the fix above: the first render otherwise reports the presentation as the content even for a recording that starts on a screenshare, and only corrects itself on the first time update. Verified that it is not the cause of the blank layer — video.js recovers when its container is unhidden, which is why <Screenshare> is kept mounted under display: none rather than conditionally rendered Fixes #363
This was referenced Oct 19, 2026
antobinary
pushed a commit
that referenced
this pull request
Oct 20, 2026
Since #331 the content area unmounts while layout.xml minimizes the presentation, disposing the screenshare player with it. Showing it back mounts a new video.js player paused at 0, and no webcams event follows to bring it in line: the screenshare stays paused on its first, black, frame for the whole share, and a share seeked into before the screenshare has ever mounted plays from 0 instead of from the seeked time. A tab switch seeks it through the visibilitychange handler but never resumes it, which on a static shared screen passes for a fix. Keep the content area mounted and hide it with display: none, as is already done for the screenshare itself, so the players are created once and stay synchronized. This also avoids re-creating the whiteboard and reloading the slides each time the presentation is shown back.
antobinary
pushed a commit
that referenced
this pull request
Oct 20, 2026
Since #331 the content area unmounts while layout.xml minimizes the presentation, disposing the screenshare player with it. Showing it back mounts a new video.js player paused at 0, and no webcams event follows to bring it in line: the screenshare stays paused on its first, black, frame for the whole share, and a share seeked into before the screenshare has ever mounted plays from 0 instead of from the seeked time. A tab switch seeks it through the visibilitychange handler but never resumes it, which on a static shared screen passes for a fix. Keep the content area mounted and hide it with display: none, as is already done for the screenshare itself, so the players are created once and stay synchronized. This also avoids re-creating the whiteboard and reloading the slides each time the presentation is shown back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support to the new event saying when the presenter minimized the presentation (added in bigbluebutton/bigbluebutton#23924). When found it:
Playback.mp4
This PR should be merged and tagged togeter with bigbluebutton/bigbluebutton#23924 so they are kept in sync and don't generate artificacts of screenshare as content in thumbnails.