Skip to content

fix: replay inline video after it ends when autoplay is off#466

Merged
barrydeen merged 1 commit intomainfrom
fix/video-replay-autoplay-disabled
Apr 17, 2026
Merged

fix: replay inline video after it ends when autoplay is off#466
barrydeen merged 1 commit intomainfrom
fix/video-replay-autoplay-disabled

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • With autoplay disabled, an inline video could only be played once — after it finished, tapping the play overlay did nothing.
  • Root cause: ExoPlayer stays at its end position after STATE_ENDED, so calling play() again has no effect. The overlay click now seeks to 0 first if the player has ended.
  • Applied to both InlineVideoPlayerWithFullscreen and InlineVideoPlayer in RichContent.kt.

Test plan

  • Disable video autoplay in settings.
  • Open a note with an inline video, tap play, let it finish.
  • Tap the play overlay again — video should restart from the beginning.
  • Mid-video: tap the pause control, then tap the play overlay — video should resume from the current position (not restart).

ExoPlayer in STATE_ENDED stays at the end position, so calling play()
on the overlay tap had no effect after the video finished once. Seek
back to 0 before playing if the player has ended.
@barrydeen barrydeen merged commit 1b51a4b into main Apr 17, 2026
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