capacitor-plugin-playlist icon indicating copy to clipboard operation
capacitor-plugin-playlist copied to clipboard

[iOS] Play after pause always resets to start of current track

Open dasantonym opened this issue 3 years ago • 1 comments

Not sure if I am doing something fundamentally wrong here, but when I create a single-track playlist like this:

const player = new RmxAudioPlayer()
await player.initialize()
await player.setOptions({
  verbose: false,
  options: {
    icon: 'icon_bw'
  }
})
await player.addItem({
  title: 'asdf',
  assetUrl: uri,
  isStream: false,
  trackId: uuidv4()
})
await player.play()

This plays just fine, but pause seems to behave oddly.

When I call await player.pause() on the player, it pauses, but after calling await player.play() it always starts from the beginning of the track.

Seeking also has no effect and I am not getting any errors so I assume this is some fundamental problem here? The lock-screen controls cause the same reset after pause and then play. I tried it using the setPlaylistItems command and used the retainPosition: true option, but to no avail.

Edit: This is happening on iOS 13.1.2

dasantonym avatar Jun 20 '21 08:06 dasantonym