Skip to content

How to stream a remote EPUB from an URL without downloading it? #49

Closed Answered by mickael-menu
rhodeon asked this question in Q&A
Discussion options

You must be logged in to vote

EDIT: This will be possible in the upcoming Readium 3.0.

There's nothing available out of the box for this use case, but there are options:

  • If the EPUB is served exploded on the server at a given URL, then you should be able to read it using an HttpFetcher. You will need to provide to Streamer.open() a custom implementation of PublicationAsset which creates the HttpFetcher. Look at FileAsset for an example implementation.
  • If the EPUB is served as a single ZIP file on the server, it will be more complicated. The Java ZipFile API we are using doesn't support remote streaming of a ZIP archive. What you could do is:
    1. Find a ZIP library supporting streaming.
    2. Create an implementation of Archive

Replies: 0 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@rhodeon
Comment options

@mickael-menu
Comment options

@rhodeon
Comment options

Answer selected by mickael-menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants