Repository navigation
fix: stream audio files that are not downloaded - #4526
Merged
Merged
Conversation
Since the new media viewer, an audio file that was not on the device was downloaded in full before it could play, so a long recording or podcast started only after the whole file arrived. The viewer also released that copy once the page left its buffer, so playing it again downloaded it again. Earlier versions streamed audio, and video still does. Audio now plays from the same direct download link video uses. It is downloaded first only when no link can be created or when the server uses a certificate the user trusted manually, which AVPlayer cannot use. Assisted-by: Claude Code:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
marinofaggiana
force-pushed
the
fix/audio-streaming
branch
from
December 5, 2026 15:55
dc6bd11 to
dd48d43
Compare
Assisted-by: Claude Code:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
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.
Summary
Audio files that are not on the device now start playing at once, streamed from the server, instead of being downloaded in full first.
Since the new media viewer (33.1.0), an audio file had to be downloaded completely before it could play, so a long recording or podcast started only after the whole file arrived. The viewer also released that copy once the page left its buffer, so playing it again downloaded it again. Earlier versions streamed audio, and video still does. A tester reported this as a regression on TestFlight.
NCVideoURLResolver), through the newNCMediaViewerLoading.streamingURL(for:).urlinstead oflocalURL, because it can be a remote URL.Testing
Ran
NextcloudUnitTestslocally: all 234 tests pass. On the iPhone Duo simulator against a local Nextcloud 35 server, opened a 7:41.m4athat was not downloaded: playback started at once, the server log showed only range requests (206) on the direct link and no full download, and play, pause and the 10-second skips worked. Not tested on a device or on a slow network.Suggested checks on a live Nextcloud instance:
🤖 AI (if applicable)
🤖 Generated with Claude Code