Web
On web, ReadiumView renders with Readium's TypeScript toolkit for EPUB and
PDF.js for PDF, through React Native Web.
Serving publications
The web reader fetches a publication over HTTP instead of opening a file:
- EPUB:
file.urlis the URL of the unpacked EPUB'smanifest.json, a Readium Web Publication Manifest. A streamer serves one from an.epub; this server is an example. - PDF:
file.urlis the PDF's URL.
What differs from native
| Feature | Web |
|---|---|
| Search | Not supported (capabilities.search is false) |
| Zoom | PDF only; onZoomChange reports the scale, including pinches |
file.credentials, LCP | Not supported: LCP is native only |
Use capabilities from onPublicationReady to adapt the UI rather than checking the platform.
Next.js
The Next.js example
shows the setup: React Native Web, and transpilePackages for the library and its dependencies
in next.config.js.