Automattic/pocket-casts-android

Bookmark sharing can loop audio

Closed this issue · 0 comments

Description

Sharing a bookmark can lead to an endless loop. It should just play from the timestamp.

Step-by-step reproduction instructions

  1. Play an episode for which you have a bookmark.
  2. Share a bookmark link and paste it in the browser.
  3. Tap Open in Pocket Casts.
  4. The episode will be now looped at the bookmark timestamp.

This code is responsible for the looping.

.doOnNext {
if (it is EpisodeFragmentState.Loaded) {
timestamp?.let { timestamp ->
if (it.episode.playedUpTo.toInt() != timestamp.toInt(DurationUnit.SECONDS) &&
episode is PodcastEpisode
) {
it.episode.playedUpTo = timestamp.toDouble(DurationUnit.SECONDS)
seekToTimeMs(timestamp.toInt(DurationUnit.MILLISECONDS))
}
}
episode = it.episode
}
}

timestamp is set up once but is triggered on every update with doOnNext(). This causes it to be endlessly looped.

Screenshots or screen recording

video.mp4

Did you search for existing bug reports?

  • I have searched for existing bug reports.

Device, Operating system, and Pocket Casts app version

Google Pixel 6, Android 14, Pocket Casts 7367e4b