epub.js
epub.js copied to clipboard
how to get the progress a reader made on a book using eupbjs
I am building a website for reading book online and I want a way to get the progress mad by a user on a book so I can save it.
Use book.locations.percentageFromCfi(currCfi) where currCfi is the current location CFI. You can get the current CFI with the relocated event. the relocated event sends an object with information about the current page.
rendition.on("relocated", function(location) { console.log(location.start.cfi) });