Skip to content

media-viewer#4118

Open
marinofaggiana wants to merge 22 commits into
masterfrom
MediaViewer
Open

media-viewer#4118
marinofaggiana wants to merge 22 commits into
masterfrom
MediaViewer

Conversation

@marinofaggiana
Copy link
Copy Markdown
Member

@marinofaggiana marinofaggiana commented May 22, 2026

Summary

This PR refactors and modernizes the media viewer architecture, replacing the previous viewer flow with a more stable paging-based implementation and a cleaner separation between image, audio, and video handling.

The main goal is to make the media viewer more robust, easier to maintain, and better suited for large media collections, while keeping video playback isolated from image and audio behavior.

Main changes

  • Reworked the media viewer around a dedicated paging architecture.
  • Replaced the SwiftUI page-style approach with a UIKit-backed paging flow for better stability and performance.
  • Added a clearer separation between media page state, page model, and viewer model.
  • Improved visible-page tracking and metadata/title updates while paging.
  • Added better handling for bounds changes and device rotation to avoid accidental index changes.
  • Isolated video playback behavior from image and audio logic.
  • Added fullscreen AVPlayer and VLC video controllers with aligned behavior.
  • Added previous/next navigation callbacks for fullscreen video playback.
  • Improved video close handling so fullscreen video controllers can close cleanly without breaking the media viewer state.
  • Added a shared media detail view usable for images and videos.
  • Removed full-resolution download actions from the detail view to avoid unexpected large downloads, especially for videos.
  • Improved floating title handling and title color updates based on the visible media background.
  • Added info/detail access to fullscreen video controllers.
  • Cleaned up old notification-based close handling in favor of explicit callbacks.

Notes

The video playback flow now keeps AVPlayer and VLC behavior aligned as much as possible, while still allowing framework-specific differences where needed.

The refactor also avoids touching image buffering and audio behavior beyond what was necessary for the shared media viewer structure.

@marinofaggiana marinofaggiana marked this pull request as draft May 22, 2026 15:08
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana marinofaggiana marked this pull request as ready for review May 26, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant