-
Notifications
You must be signed in to change notification settings - Fork 93
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
[Bug] Streaming publication using LCPL file #618
Comments
Please try to reproduce this on the testapp (I can't do it). I can help you enable LCP support on Slack if you need it. |
Note that you don't pass a NB: I agree that the documentation is a bit misleading, we'll fix it. |
@qnga I need your help to enable LCP streaming, what is the best way to connect with you on Slack? |
I sent to you instructions on the Readium Slack, as you seem to have access to it. |
@qnga we are encounter same issue. |
@KaramYaaqba did you get why this error occur |
@hishampro5, the first issue in my case is that our backend server does not support the HEAD method. We are fixing it, but until then, we cannot stream publications. |
Also don't forget to pass the LCP content protection when initializing the See the documentation for that: https://github.com/readium/kotlin-toolkit/blob/3.0.3/docs/guides/lcp.md#initializing-the-publicationopener |
Any update on this? |
Describe the bug
I am trying to implement streaming for books and audiobooks using the Readium 3.0 toolkit, following the instructions in the documentation (https://github.com/readium/kotlin-toolkit/blob/develop/docs/guides/lcp.md) under the "Streaming an LCP protected package" section. However, I am getting a "Format Not Supported" error, which does not occur when I load the book from the LCPL file instead of streaming:
org.readium.r2.streamer.PublicationOpener$OpenError$FormatNotSupported@c128feb
Here is the code snippet I am using:
`
suspend fun importPublicationFromStorage(uri: Uri) {
// Instantiate the required components.
val context = app.applicationContext.applicationContext
val httpClient = DefaultHttpClient()
val assetRetriever = AssetRetriever(
contentResolver = context.contentResolver,
httpClient = httpClient
)
val publicationOpener = PublicationOpener(
publicationParser = DefaultPublicationParser(
context,
httpClient = httpClient,
assetRetriever = assetRetriever,
pdfFactory = PdfiumDocumentFactory(context)
)
)
val asset =
assetRetriever.retrieve(uri.toAbsoluteUrl()!!).getOrElse {
null
}
`
How to reproduce?
1- Load the LCPL file using the provided code.
2- An exception will occur when you do so.
Readium version
3.0
Android API version
35
Additional context
No response
The text was updated successfully, but these errors were encountered: