readium-js-viewer icon indicating copy to clipboard operation
readium-js-viewer copied to clipboard

Can we use readium-js-viewer library by providing json data

Open vivek1395068 opened this issue 5 years ago • 2 comments

Can we use readium-js-viewer library by providing json data and not providing the epub path? What I mean by this is that we ourselves will do the pre-processing things like parsing the content.xml, opf file , toc.ncx etc. We will provide all the required information in the json format , which will exactly be the same as we get after parsing all the above mentioned files.

The reason why we need like this is :-

  1. All our html file s are encrypted
  2. We want to enhance the performance, which may be sluggish due parsing steps as done in the library

So the question is :- is there any method in the library which we can use to send the json data and do the other necessary processing.

vivek1395068 avatar Jul 04 '19 11:07 vivek1395068

What you describe is what we (Readium members) are doing in the new Readium Architecture via the Readium WebPub manifest.

So, just join us creating a new Readium Web toolkit, the next generation of Readium "cloud reader". see https://jccr.github.io/readium-web/ (temporary URL).

llemeurfr avatar Jul 04 '19 12:07 llemeurfr

I agree with Laurent (i.e. I would also suggest to join a modern active effort, rather than attempting to retrofit complex functionality into an older unmaintained codebase). However, for the sake of completion, I shall mention prior art: https://github.com/readium/readium-js/compare/master...evidentpoint:feature/readium2?expand=1 This was an effort to allow the readium-js engine to ingest the new JSON manifest syntax of the Readium Architecture which Laurent mentioned (sometimes called "Readium 2"). This is only a prototype, but it gives you an idea of the kind of code changes required to make this work (internally, readium-js and readium-shared-js already make use of a JSON-based model, instantiated from zipped or exploded EPUBs, so native support for the new JSON manifest syntax consists mostly in a format conversion).

danielweck avatar Aug 08 '19 11:08 danielweck