Skip to content

Tts/AudioNavigator.go with locator with progression restarts file. #771

Description

@m-abs

Describe the bug

Calling go() with a locator with just href and progression restarts the file from 0s or first element.

How to reproduce?

  1. Open a audiobook or epub with tts.
  2. Start playback
  3. Call go() on the audio navigator with a progression instead of a time fragment.
  4. Observe playback restarted from 0s.

Readium version

3.1.2

Android API version

15

Additional context

Example locator:

Locator(href=De_nye_l_sere-00003.mp3, mediaType=audio/mpeg, title=Kolofon og bibliografiske oplysninger, locations=Locations(fragments=[], progression=0.20038750000000002, position=null, totalProgression=null, otherLocations={}), text=Text(before=null, highlight=null, after=null))

This is caused by this in the audionavigator: https://github.com/readium/kotlin-toolkit/blob/develop/readium/navigators/media/audio/src/main/java/org/readium/navigator/media/audio/AudioNavigator.kt#L182

locator.locations.time is null so it defaults to 0s and never looks at progression.

It is also a problem with the TTSNavigator, but I'm not sure where it happens.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions