-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioNavigator.seek cannot cross previous resource boundary #394
Comments
It works as intended. An audiobook player usually provides scrubbing control for the current resource only. Hovewer, I get that it may not fit all needs. How about these alternatives? enum TimeScope {
case currentResource
case publication
}
func seek(to time: Double, in scope: TimeScope = .currentResource)
navigator.seek(to: 30, in: .publication) and having Are you interested in contributing these changes? |
I wonder if perhaps we are conflating resources and chapters, or perhaps I am misunderstanding. Does Readium process embedded chapter metadata and convert to "virtual" resources? If not, I would love if there was a unified way to deal with publication chapters for both embedded chapters (like in an M4B) and per-file chapters (like in a zipped audiobook of MP3s). Any thoughts on providing a unified API for navigating chapters? Regarding the above |
It doesn't, in Readium a "resource" always refers to a single entry in a ZIP package, and/or an entry in a Readium Audiobook Manifest. There's no plan to parse a chapter list from a M4B directly in the toolkit's For chapters (as opposed to resource), we store them in the But for an audio table of contents it should be easy, as they would use a time fragment or progression percentage. What would an ideal chapter navigation API look like to you? |
I didn't know about Does "no plan" to parse a chapter list in I'm not sure about the ideal API for utilizing chapters, but I'll try to talk through my potential use cases. For current playback and book overview, I'd want to be able to display chapter title, duration, and progress. For playback, I'd want to be able to seek forward and backward within chapters and between chapters, essentially what you proposed for resource seeking with time scopes. Perhaps this points to |
It depends on whether this requires a third-party dependency. We aim to minimize them in the toolkit.
Maybe we need a |
That makes sense. I'll look into this at some point and see what can be provided without extra dependencies.
Sounds good! I've also been reading swift-toolkit to better understand how it works, and I'm confused by the differences between a custom |
The
|
Thanks for the explanation! It sounds like |
Would you accept a PR that changes |
Sure thanks! |
Describe the bug
seek
seems unusable for a slider component or rewind button in a multi-resource audiobook, because it cannot go further back than the beginning of the current resource.How to reproduce?
navigator.seek(to: time)
andnavigator.seek(by: -time)
cannot move the current playback position from resourcen
to resourcen-1
. Instead, it moves playback to the beginning of resourcen
.Readium version
I tried
2.6.1
anddevelop
OS version
17.2
Testing device
simulator
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: