Skip to content

Improve remote video playback reliability and VLC lifecycle handling - #4217

Merged
marinofaggiana merged 3 commits into
masterfrom
video-info
Aug 1, 2026
Merged

Improve remote video playback reliability and VLC lifecycle handling#4217
marinofaggiana merged 3 commits into
masterfrom
video-info

Conversation

@marinofaggiana

Copy link
Copy Markdown
Member

Summary

Improve remote video playback reliability and prevent VLC lifecycle races when changing or closing videos.

Changes

  • Replace the AVFoundation status observation with an async playability check.
  • Fall back to VLC when the AVFoundation probe fails or exceeds 8 seconds.
  • Cancel obsolete playback probes when the selected video changes.
  • Wait for VLC to stop completely before detaching its drawable, dismissing the player, or changing video.
  • Recover the SwiftUI playback state when VLC presentation is rejected, allowing a new playback attempt.
  • Forward the configured user agent to remote playback.
  • Add privacy-safe VLC diagnostics for presentation, playback requests, and state changes. Direct URL paths, queries, and tokens are never logged.
  • Update the app version to 34.1.1.

Motivation

Remote videos could remain indefinitely in the loading state when the AVFoundation probe did not complete or when a VLC presentation request was rejected during a transition.

VLC could also continue accessing its rendering view while the player was being dismissed or another video was selected, potentially triggering an Auto Layout operation outside the main thread.

Testing

  • Nextcloud scheme builds successfully in Xcode.
  • Verified cancellation and fallback paths compile correctly.
  • Verified VLC shutdown completes before the drawable and controller are released.
  • Verified rejected presentations reset the playback state and can be retried.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Use an async AVFoundation playability check with cancellation and an eight-second VLC fallback timeout.

Pass the user agent to video playback and bump the app version to 34.1.1.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Reset playback launch state when presentation is rejected and add VLC presentation and playback diagnostics.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana
marinofaggiana merged commit 4c4be4f into master Aug 1, 2026
4 checks passed
@marinofaggiana
marinofaggiana deleted the video-info branch August 1, 2026 08:08
@marinofaggiana marinofaggiana self-assigned this Aug 1, 2026
@marinofaggiana

Copy link
Copy Markdown
Member Author

#4209

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