Skip to content

fix(playback): keep chosen speed and prevent unwanted restarts (builds on #974) - #1011

Open
ashtonian wants to merge 5 commits into
madeofpendletonwool:mainfrom
ashtonian:fix/ios-playback-intent-upstream
Open

ashtonian wants to merge 5 commits into
madeofpendletonwool:mainfrom
ashtonian:fix/ios-playback-intent-upstream

Conversation

@ashtonian

@ashtonian ashtonian commented Oct 18, 2026 •

Copy link
Copy Markdown

Builds on @mrmichaeladavis's #974, which preserves playback speed across episode starts and resumes, respects the server's podcast-specific speed flag, and resumes after eligible iOS interruptions. Both original commits are preserved.

Adds on top of #974:

  • Keeps podcast-specific speeds from overwriting the listener's saved default, for both streamed episodes and locally downloaded episodes. For example, a podcast set to 1.5x no longer changes the 1.25x default used for other podcasts; speeds chosen by the listener still persist.
  • Tracks the listener's playback choice separately from system interruptions. An interruption ending with shouldResume resumes only playback the listener still wants; pausing or stopping cancels that automatic resume.
  • Guards asynchronous asset loads and initial seek callbacks against pauses, stops, and episode changes. Late callbacks cannot start a superseded episode, and pressing Play while a new episode loads waits for that episode instead of restarting the previous one. Now Playing reports the actual rate while paused or waiting for the initial seek.
  • Adds a tested Swift playback-intent component and dedicated CI, plus Flutter regressions for speed persistence, the server customization flag, and applying podcast overrides without saving them as the default.

Validation: 268 Flutter tests and seven Swift state tests pass; combined with #1008, all 271 Flutter tests pass. The analyzer passes the error gate, and native Audio/CarPlay sources pass iOS SDK type-checking. Full app build and physical-device interruption/Bluetooth/CarPlay testing remain outstanding; state tests do not exercise the native player itself. GitHub Actions await maintainer approval. No external dependency is added.

This PR contains #974 plus these additions and targets main. If #974 lands separately first, sync this branch before merging. Seek completion reporting remains separate work.

Related: #973, #882, #963. Replaces the closed fork follow-up.

Michael A. Davis and others added 4 commits August 28, 2026 21:46
…ayback speed on play

- Auto-resume playback when AVAudioSession reports an interruption ended
  with shouldResume (e.g. a Siri or notification readout), instead of
  leaving the episode paused with no way to resume it if the screen is
  off. Real phone calls don't set shouldResume, so they're unaffected.
- AVPlayer.play() always resets rate to 1.0, discarding a user-selected
  playback speed on episode start, lock-screen play, and interruption
  resume. Track the desired rate and reassert it after every play() call.

Fixes the iOS side of madeofpendletonwool#882.
…l speed

Root cause of both madeofpendletonwool#882 (iOS) and madeofpendletonwool#963 (Android): getPlayEpisodeDetails
parsed the server's playback_speed field but dropped
playback_speed_customized, which the Rust backend sends to distinguish a
real per-podcast override from it echoing back the account-wide default
(Users.playbackspeed). The mobile speed selector only writes to local
SharedPreferences and never syncs to that server column, so for anyone
who hasn't set it via the web UI it sits at 1.0.

playPinepodsEpisode() then unconditionally called setPlaybackSpeed with
that value right after starting playback, stomping whatever speed
playEpisode() had just applied locally, on every episode start, on both
platforms. That's why tapping the in-app speed +/- buttons after
playback started seemed to fix it: it's the only path with no follow-up
override.

Add playbackSpeedCustomized to PlayEpisodeDetails and only apply the
server's speed when it's an actual customization, in both the main
playback path and the local-download background enrichment path.

This doesn't replace the AVPlayer.play()-resets-rate fix already applied
for iOS. That's a separate, contributing bug.
@ashtonian ashtonian changed the title fix(ios): preserve playback intent and speed (builds on #974) fix(playback): preserve speed preferences and iOS playback intent (builds on #974) Oct 18, 2026
@ashtonian
ashtonian marked this pull request as ready for review October 18, 2026 02:10
@ashtonian ashtonian changed the title fix(playback): preserve speed preferences and iOS playback intent (builds on #974) fix(playback): keep chosen speed and prevent unwanted restarts (builds on #974) Oct 18, 2026

This branch has not been deployed

No deployments
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