Comments (9)
The html code looks like this:
<title></title> <link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/popup.css">
<script src="js/libs/jquery-1.9.0.min.js"></script>
<script src="js/libs/zip.min.js"></script>
<script>
"use strict";
document.onreadystatechange = function () {
if (document.readyState == "complete") {
EPUBJS.VERSION = "0.1.6";
EPUBJS.filePath = "js/libs/";
zip.workerScriptsPath = "js/libs/";
EPUBJS.cssPath = "css/";
fileStorage.filePath = EPUBJS.filePath;
EPUBJSR.app.init("epub/10_Questions_Every_Christian_Must_Answer_Alex_McFarland.epub");
}
};
</script>
<!-- Render -->
<script src="js/epub.min.js"></script>
<!-- Zip JS -->
<script src="js/libs/zip.min.js"></script>
<!-- Hooks -->
<script async src="js/hooks.min.js"></script>
<!-- Reader -->
<script src="js/reader.min.js"></script>
<!-- fileStorage -->
<script src="js/libs/fileStorage.min.js"></script>
</head>
<body>
<div id="sidebar">
<div id="controls">
<!-- <input id="search" placeholder="search"> -->
<a id="network"><img id="store" src="img/save.png"></a>
<a id="setting"><img id="settings" src="img/settings.png"></a>
<a id="bookmark"><img id="bookmarks" src="img/star.png"></a>
</div>
<div id="toc">
</div>
<div id="settingsPanel">
</div>
</div>
<div id="main">
<div id="opener">
<a id="open"><img src="img/menu-icon.png"></a>
</div>
<div id="titlebar">
<span id="book-title"></span>
<span id="title-seperator"> – </span>
<span id="chapter-title"> </span>
</div>
<div id="divider"></div>
<div id="prev" class="arrow">‹</div>
<div id="area"></div>
<div id="next" class="arrow">›</div>
<div id="loader"><img src="img/loader.gif"></div>
</div>
</body>
from epub.js.
Are you getting anything logged to the console when loading hangs?
from epub.js.
Thanks for replying to my query. No, nothing gets logged to the console in the process... do you have any suggestions I could try?
(I assume that if the scripts work offline, it should work online when uploaded to the server)
from epub.js.
I'd suggest trying opening the book in
examples/basic-dev.html
The code is uncompressed and should giver better errors.
It's possible the the server you are using doesn't implement http chunking which zip.js uses to read the epub file.
It should fall back and work normally, but maybe it isn't.
Could you test with a unzipped version of the epub and see if anything is displayed?
from epub.js.
I uploaded the package to the server and tried using basic-dev.html. Mobi-dick/ content does not load up.
I tried your suggestion using an unzipped version of other epub ebooks, but nothing loads. I just see a blank page with the controls.
The hosting server I am using is windows based and apparently does not allow modifications of files by the public. So I think you maybe right that chunking may not be working because of this.
What I don't get is that I never got the basic-dev.html to work locally either , whether it's with unzipped or zipped files
from epub.js.
If you're running this on a server do you have a url (or could you make a temporary url) so that we could help you debug?
If the controls are loading, then Epub.js might be having issues opening your book or fetching the resources from the unzipped Epub. In your browsers developer tools, you should look at the network calls to see if epub.js is failing to get the epub file resources. This could be because your server is not allowing GET requests to access the contents of that directory (e.g. similar to getting a static/js static/css static/html or other resource type).
Also one thing that has helped me debug this, has been checking if the Table of Contents is loading or not.
from epub.js.
@AJRenold and @fchasen Thanks for the suggestions.
I have uploaded the epub.js package to the server and the link to basic-dev.html is:
http://www.ecac.ca/emc/resources/epub.js/examples/basic-dev.html
The script is pointing to:
<script>
"use strict";
var Book = ePub("../demo/moby-dick/", {restore: true, reload: false });
</script>
I only get a blank page at this point. I would greatly appreciate any further pointers as to what I am doing wrong or where the problem might be.
from epub.js.
I figured out where the problem was. It's the server not having a specified MIME type for ".epub" files and so it does not know how to 'treat' it. I went under "user-configurable IIS settings" in IIs Administration Console and custom assigned ".epub" to "application/epub+zip" MIME type. The epub files are working now with the script above.
Thanks you guys for your help.
from epub.js.
Great, will update the readme to reflect this.
from epub.js.
Related Issues (20)
- What happened to the official website? The content is very strange. HOT 2
- Continuous Manager inside an element that is scrolling that is not the viewport?
- Scripted Content SandBoxing issue, And CFI pages position
- Extracting the text per rendered section / block using epub js? HOT 32
- How do I add a paginated swipe animation?
- highlight not working post integrating with hammer.js for swiping HOT 1
- how to call images in css file? HOT 1
- about rendition.next(), rendition.prev()
- about InlineView
- Minified XML causes 'container.xml not found' HOT 4
- renderTo CSS selector instead of ID HOT 1
- [Bug] Blank page when resize happen during loading
- How to add any emoji on page ?
- How to add any emoji on page? HOT 2
- how to turn the page by wheel
- rapidly scroll up and down will cause error in continuous-scrolled example
- How do I get the text on this page when it is truncated
- fix error File not found in the epub and replace file addresses
- Generate total page locations HOT 2
- Highlight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epub.js.