Is it possible to switch layout by device orientation?

6 posts / 0 new
Last post

Hello,

My issue is similer to the following :

http://idpf.org/forum/topic-827

What I'd like to do is :

* when device's orientation is portrait, show reflowable content
* device's orientation is landscape, fixed(pre-pagenated) content

Is it posible?

Not by native epub functionality. You'd have to hack a solution, like creating a fixed layout publication with reflowable fallbacks and then check the orientation of the device via javascript to change the document on load. But it would be slow, clunky, cause pages to render twice when the reflowed version has to be shown (regardless of orientation change), and not work on all reading systems, so hardly seems worth the bother.

The Advanced Hybrid Layout working group is looking at rendition selection, but I'm not aware that device orientation is a criteria for switching (more along the lines of language, type of content, etc.).

Thanks Matt,

At the section "RS4 Adaptation to device characteristics" in the proposal of The Advanced Hybrid Layout WG,

I found "RS4c" saying :

"When the device characteristics change dynamically (e.g. orientation change by the user), it is possible for a Reading System to change rendering to use a rendition that better fits the new circumstances, without losing the current reading position"

http://www.idpf.org/charters/2012/layout/ahl.html#h.eub0wrqgo7eg

Althtough, it seems that this is still just a proposal.

Right, I've only been following that work very loosely, as it's still under discussion. I just haven't seen device characteristics being discussed on the working group mailing list, only the scenarios above noted at various times, but that doesn't mean the functionality won't be in the final specification. Most of the talk has centered around region mapping, panel navigation, and discovery.

The WG is not expected to deliver a document until later in the year, as there are a number of very fundamental questions still to be worked out (some of which is being brought into the ongoing 3.0.1 revision). And then, as you know, even with a specification document it will still be time before practical support starts appearing in reading systems.

thanks, It seems that I should be patient until the spec will be released & RS comes.

By the way, from a point of view as a developper,
To impl "multi-Publications"-ready Reading System is really hard, almost impossible.
because the spec allows any kind of content types..

An AHL publication is supposed to degrade gracefully so that EPUB reading systems that don't support the sub-specification can still render the default publication in the first rootfile. Even though there isn't a specification yet, some measure of backwards compatibility is normally required in these projects to prevent complete breakage.

And there are some limits on the content types, at least as far as requiring core media type support and content documents. It doesn't make implementing the fallback processing to inject the supported formats easier, of course, but only video is truly wide open to including any format.

AHL will no doubt introduce some twists into the format. Metadata being pushed up to the container, for example, seems like it will inevitably lead to two different ways to package EPUBs, and there will always be a problem of selling content that potentially not every reading system will give the reader access to. But so long as the benefits outweight the costs, I'm not against any new direction the format takes. There are a lot of cool new possibilities for publications that AHL will open up that seem to outweigh such inconveniences, but only time will tell which features get uptake.

Secondary menu