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

Current CloudReader has stopped working on iOS #675

Closed CircularKen closed 6 years ago

CircularKen commented 6 years ago

This issue is a Bug

Earlier builds of the Readium CloudReader had been working well on iOS Safari on iPad and iPhone e.g. https://www.circularsoftware.com/CircularFLO_Online/readium.html?epub=epub_content/CircularFLO_v5_1_promo

Instead, Whilst Readium 2.28.0-alpha works as expects in Safari on Mac it does not show the epub content
https://circularsoftware.com/MasterPlan/reader2/?epub=..%2F..%2FCircularFLO_Online%2Fepub_content%2FCircularFLO_v5_1_promo

Product

I have directed these reader to the same content to rule out any difference in EPUB. Looking at the paths I wonder if the slash / being replaced with %2F is the issue??

danielweck commented 6 years ago

The first link should be (can you please test again on iOS, to check that the bug is as you previously observed?): https://www.circularsoftware.com/CircularFLO_Online/readium.html?epub=./epub_content/CircularFLO_v5_1_promo

danielweck commented 6 years ago

Try again please, I messed up the original link: https://www.circularsoftware.com/CircularFLO_Online/readium.html?epub=./epub_content/CircularFLO_v5_1_promo PS: I am able to reproduce the issue on my iPad 4, and I found the culprit.

CircularKen commented 6 years ago

The older Readium first link is working on iOS as either

https://www.circularsoftware.com/CircularFLO_Online/readium.html?epub=epub_content/CircularFLO_v5_1_promo

or

https://www.circularsoftware.com/CircularFLO_Online/readium.html?epub=./epub_content/CircularFLO_v5_1_promo

danielweck commented 6 years ago

The culprit is screenfull.onchange which doesn't seem to exist in iOS.

danielweck commented 6 years ago

TypeError: v.onchange is not a function. (In 'v.onchange', 'v.onchange' is undefined)

jccr commented 6 years ago

@danielweck Is this code in our codebase somewhere? Or JS in this particular book?

danielweck commented 6 years ago

It's in Readium. I'm creating a Pull Request and will push the fix into develop so users can double-check on their iOS devices. I tested on my LAN and the fix appears to work fine.

See: https://caniuse.com/#feat=fullscreen

danielweck commented 6 years ago

Fixed by: https://github.com/readium/readium-js-viewer/pull/676

danielweck commented 6 years ago

TravisCI is building ... https://travis-ci.org/readium/readium-js-viewer/builds/306724573

(I will let you know when to test the cloud reader again on iOS, as soon as the app is deployed to Firebase / Surge)

danielweck commented 6 years ago

Tested at https://readium.firebaseapp.com, works fine. Closing.