Skip to content

fix: Ensure media playback starts if there was no preview image#2072

Merged
nikclayton merged 1 commit intopachli:mainfrom
nikclayton:2016-player-controls
Feb 5, 2026
Merged

fix: Ensure media playback starts if there was no preview image#2072
nikclayton merged 1 commit intopachli:mainfrom
nikclayton:2016-player-controls

Conversation

@nikclayton
Copy link
Copy Markdown
Contributor

Previous code was triggering media playback when the transition from the preview image on the previous activity to the preview image in the fragment hosted by ViewMediaActivity had completed.

This never completes if there was no preview image. For example, some audio files, or if the user has disabled media previews.

This also meant the UI controls never appeared.

Fix this by triggering playback on onEnterAnimationComplete, which completes after the enter animation (including shared element transitions) have completed.

Fixes #2016

Previous code was triggering media playback when the transition from
the preview image on the previous activity to the preview image in
the fragment hosted by `ViewMediaActivity` had completed.

This never completes if there was no preview image. For example, some
audio files, or if the user has disabled media previews.

This also meant the UI controls never appeared.

Fix this by triggering playback on `onEnterAnimationComplete`, which
completes after the enter animation (including shared element transitions)
have completed.

Fixes pachli#2016
@nikclayton nikclayton merged commit d09b4ff into pachli:main Feb 5, 2026
27 checks passed
@nikclayton nikclayton deleted the 2016-player-controls branch February 5, 2026 11:25
@nikclayton
Copy link
Copy Markdown
Contributor Author

Fixes #2061

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