Skip to content

fix: Force grid layout in recording mode#18208

Open
axonbf wants to merge 4 commits into
nextcloud:mainfrom
axonbf:fix-recording-grid-layout
Open

fix: Force grid layout in recording mode#18208
axonbf wants to merge 4 commits into
nextcloud:mainfrom
axonbf:fix-recording-grid-layout

Conversation

@axonbf
Copy link
Copy Markdown

@axonbf axonbf commented Jun 5, 2026

Problem

When recording a Talk call, the recording browser session uses promoted/speaker view by default. This means only the active speaker is shown prominently, with other participants in a thin stripe at the bottom. For recorded videos that will be published (e.g., podcasts, social media), a grid layout showing all participants equally is far more useful.

Issue #10060 requested a configurable grid mode for the recording backend, but was closed as "not planned" and redirected to #8768 (Recording UI customization), which remains in the backlog with no timeline.

Current workaround

The maintainer suggested modifying Participant.py on the recording server to run store.commit("isGrid", true). However, this hack has known problems:

  • The grid still shows a placeholder/empty slot for the recording participant itself
  • The slot math (slots() and shrinkGrid()) subtracts one slot for the local video, which is hidden in recording mode, causing poor layout with empty areas
  • The grid-wrapper height does not fill the recording viewport properly

Proposed fix

Instead of modifying the recording server, fix the recording frontend (RecordingApp.vueCallView.vueVideosGrid.vue) to properly support grid mode during recording:

  1. CallView.vue: When isRecording is true, force isGrid to true so the recording always uses grid layout instead of promoted view.

  2. VideosGrid.vue:

    • slots(): When recording, count all slots (do not subtract 1 for local video, since local video is hidden in recording mode).
    • shrinkGrid(): Use the same full slot count in recording mode so grid sizing does not leave empty space.

These changes only affect the recording view and do not change behavior for regular call participants.

Testing

Tested on a production Nextcloud Talk setup with a dedicated recording VPS. The recording layout correctly:

  • Shows all participants in an adaptive grid instead of promoted speaker-only view
  • Adapts from 1 to 2+ participants during an active recording
  • Fills the recording viewport without empty bottom gaps

Related issues

Comment thread src/components/CallView/CallView.vue Outdated
@axonbf
Copy link
Copy Markdown
Author

axonbf commented Jun 5, 2026

@Antreesy Updated: reverted the isGrid hardcode in CallView.vue and instead set grid mode via callViewStore.setCallViewMode() from RecordingApp.
vue. This makes it configurable rather than enforced.

@axonbf axonbf requested a review from Antreesy June 5, 2026 09:39
@Antreesy
Copy link
Copy Markdown
Contributor

Antreesy commented Jun 5, 2026

This makes it configurable rather than enforced.

Better, but it is still executed for every RecordingApp.
If UserA wants to retain the speaker view, that change is breaking for them, and it will just shift the problem to another angle.

What can be done to improve it:

  • You dive a bit into PHP backend code
  • Extend Capabilities.php to add e.g. ['config']['call']['recording-layout'] => $this->talkConfig->getRecordingLayout()
  • add method getRecordingLayout to read $this->config->getAppValue('spreed', 'recording_layout', 'speaker')
  • In frontend, change line to callViewStore.setCallViewMode({ token: token.value, isGrid: getTalkConfig('local', 'call', 'recording-layout') === 'grid', isStripeOpen: false })
  • In server terminal, you run occ config:app:set spreed recording_layout --value=grid

There you go, a configurable layout (without UI option, but we have some of those already). That's a rough description, I omitted some details, but we can polish it after changes, of course

@axonbf
Copy link
Copy Markdown
Author

axonbf commented Jun 5, 2026

I will assumed that grid is the default desired value, (since it thes the standard in calls and recordings), but I (my AI) left it speaker as default. Can you check it is ok?

@Antreesy
Copy link
Copy Markdown
Contributor

Antreesy commented Jun 5, 2026

Works in manual tests, let's fix CI and then double-check with backend maintainer:

  • DCO: repository requires all commits to be signed-off. (should have 'Signed-off-by: Author Name authoremail@example.com' in the end). We'd also appreciate if you can disclose that it was co-authored with AI in the commit message.
  • Lint: run npm run lint:fix, it should fix the import sorting
  • OpenAPI: run composer run openapi to generate files automatically
  • PHPUnit: CapabilitiesTest.php is missing new capaility added
  • It should also be documented in docs/capabilities.md. You can put it under 24, we'll discuss internally if we can backport it further
  • You can also semantically split it into three commits for readability:
    1. Backend support for the app value
    2. Regenerate OpenAPI types
    3. Frontend support for the app value

@axonbf axonbf force-pushed the fix-recording-grid-layout branch from 1d68a71 to da87714 Compare June 5, 2026 11:31
@Antreesy Antreesy requested a review from nickvergessen June 5, 2026 12:13
@Antreesy Antreesy added enhancement feature: call 📹 Voice and video calls feature: recordings ⏺️ Including the recording server labels Jun 5, 2026
@Antreesy Antreesy added this to the ⛅ Next Major (35) milestone Jun 5, 2026
@axonbf axonbf force-pushed the fix-recording-grid-layout branch from da87714 to 887d755 Compare June 5, 2026 13:29
* grid-limit: int,
* // Whether the grid limit is enforced by the server
* grid-limit-enforced: bool,
* // Recording layout ('grid' or 'speaker')
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.

This line should appear in openapi files. I'm afraid your agent might rewrite it?

Comment thread openapi-federation.json Outdated
"operationId": "federation-accept-share",
"summary": "Accept a federation invites",
"description": "🚧 Draft: Still work in progress",
"description": "\ud83d\udea7 Draft: Still work in progress",
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.

Same here, but maybe something on unicode side is unsupported on your machine 🤷🏽

Benjamin Fernandez and others added 4 commits June 5, 2026 16:13
…yout

Add configurable recording layout setting (occ config:app:set spreed recording_layout --value=grid)
to control the call layout used during recording. Defaults to 'speaker' (existing behavior).

- Config.php: add getRecordingLayout() method with validation
- Capabilities.php: expose 'recording-layout' in call config
- ResponseDefinitions.php: document recording-layout type
- CapabilitiesTest.php: add recording-layout to test expectations
- docs/capabilities.md: document the new capability under section 24

Co-authored-by: opencode <opencode@opencode.ai>
Signed-off-by: Benjamin Fernandez <fernandobenjamin.fernandezguzman@agcocorp.com>
Co-authored-by: opencode <opencode@opencode.ai>
Signed-off-by: Benjamin Fernandez <fernandobenjamin.fernandezguzman@agcocorp.com>
RecordingApp.vue reads 'recording-layout' from server capabilities and
sets the call view mode accordingly (grid or speaker). VideosGrid.vue
uses full slot count in recording mode since local video is hidden.

Co-authored-by: opencode <opencode@opencode.ai>
Signed-off-by: Benjamin Fernandez <fernandobenjamin.fernandezguzman@agcocorp.com>
Add missing Config mock return value for recording-layout in CapabilitiesTest and mark recording-layout as local in mocked capabilities.

Co-authored-by: opencode <opencode@opencode.ai>
Signed-off-by: Benjamin Fernandez <fernandobenjamin.fernandezguzman@agcocorp.com>
@axonbf axonbf force-pushed the fix-recording-grid-layout branch from 887d755 to aff5dfd Compare June 5, 2026 15:17
@axonbf axonbf requested a review from Antreesy June 5, 2026 15:58
@axonbf
Copy link
Copy Markdown
Author

axonbf commented Jun 5, 2026

@Antreesy @nickvergessen All requested changes are now addressed and CI is fully green, including OpenAPI and PHPUnit. Could you please take a final look when you have a moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement feature: call 📹 Voice and video calls feature: recordings ⏺️ Including the recording server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grid view in recording backend

2 participants