Skip to content

2.1.3

Choose a tag to compare

@superuser404notfound superuser404notfound released this 01 Jun 16:34
· 344 commits to main since this release

Playback fix: rapid play/pause no longer swallowed

Transport state sync. No public API change, existing 2.1.x callers are unaffected.

Fixed

  • Rapid play/pause presses no longer get swallowed on the native (AVPlayer) path. The engine never derived its state from the player, so when something other than engine.play() / pause() drove the AVPlayer (a host that keeps AVKit's transport bar active for Control Center skip routing, Control Center itself, or the hardware play/pause button AVKit handles internally), the engine's state went stale and the next togglePlayPause() resolved to the action already in effect, a visible no-op.

How it works now

  • NativeAVPlayerHost publishes timeControlStatus; the engine reconciles state (playing / paused) from it, guarded to the steady transport states so loading, seeking, error and idle are never clobbered. waitingToPlayAtSpecifiedRate maps to playing, so the play/pause icon does not flicker on a rebuffer.
  • togglePlayPause() decides from the live player rather than the published state, closing the async gap during fast presses.

Full diff: 2.1.2...2.1.3