readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
550 stars 186 forks source link

Save page progress and continue from there #684

Closed nasirkhan closed 6 years ago

nasirkhan commented 6 years ago

Hi, i was checking the Readium viewer and it is awesome. (http://readium.github.io/readium-js-viewer/?)

It just came to my mind that is there any way to store the progress of reading the books for logged in users so that when they came back they will continue from there.

danielweck commented 6 years ago

The web/cloud reader and the Chrome app both save the current reading location in local storage, using the following code:

savePlace() https://github.com/readium/readium-js-viewer/blob/66e8d21f0d10361326d098e413abedd8515d42e6/src/js/EpubReader.js#L758

ReaderView.bookmarkCurrentPage() https://github.com/readium/readium-shared-js/blob/dd645d38f8c29e01b386cd2b2864379358e91ed6/js/views/reader_view.js#L1089