wiki:TIMELINES/Design
Last modified 16 years ago Last modified on 05/09/09 13:17:59

Here you will find a detailed description of the internal and external design of timelines and some draft diagrams of the user interface. This is based on the discussion about timelines held on 2009-04-24 (see the discussion log). Timelines in Sophie 2.0 have a lot of differences from the timelines in Sophie 1. They are meant to be simple and powerful at the same time.

User interactions

A book in Sophie2 cannot have timelines than span all over it. Instead, each page of the book has its own timeline (that can be only one). Each group of objects on the page can also have its own single timeline. This separation ensures that there won't be situations when the timeline says the user is simultaneously on more than one page and prevents having actions involving a frame that is not on the current page. It is a substitute to the single/multiple page timelines in Sophie 1.0. The timelines of the grouped objects provide more interactive content. For example, a movie playing or some objects moving while a table of contents is shown is now possible.

Each timeline visually has three parts - intro, main part and outro. The intro and outro cannot be looped, while the main part can. By default both the intro and outro are 0 seconds long, while the main part is infinitely looped with all objects on the page shown (or hidden if the author has provided so). This will ensure that if an author wants a simple book with no interactions and animations, he doesn't have to bother with timelines. On the other hand, it is robust enough for the experienced. The intro and outro allow fade in/out effects to be created not only for the page, but for grouped elements as well.

There are two areas of timeline channels. The first one contains group channels - one for each group of elements on the page. This channel is specialised for this group and can contain only entries holding this group. This will prevent constructing invalid sets of actions by overlapping the same object on several channels. Still, it will provide flexibility to work with multiple channels and objects easily. The second type of channeles is the so called "event channels" . They do not hold an object or group that is on the page. Instead, they can hold an audio resource or eventually some specific events (for example opening a book in a new window). There can be several such channels, similarly to what Sophie 1 allows.

When a page is entered, its timeline starts playing automatically, showing the intro, main part and outro. The user will be able to skip the intro and outro. If the main part is not looped, the next page will be shown automatically after the timeline of the current stops playing. If it is looped, it will show continuously until the user (or a link action triggered by the timeline) requests to go to another page. In such case, the outro is shown. Timeline playback cannot be controlled by links. The user, however, will be able to pause the timeline and change the position of the head in the bottom flap timelines panel.

As a start, timelines will be able to control the visibility of page elements and the state of the media. Additional actions might be supported at a later stage. The current LinkActions for Hide/Show/Toggle Frame will be used.

This concept of timelines allows for easy implementation of the most popular of their uses - a slide show of photos with audio annotations and a table of contents or dvd-like menu. The design should be still flexible enough to allow plenty of other uses of timelines.

Internal design

Timelines, channels and timeline entries will be pro-objects instead of resources (similarly to links, linк actions, triggers and rules). Each page will keep references to its timeline. The same applies for each group of page elements. For each of these groups, a channel will be added to the timeline.

Each timeline will keep a list of channels and a reference to its parent, i.e. the page it controls. Timelines will have methods for playing, stopping, jumping to a location, adding and removing of channels and entries, etc. Timelines cannot be created or deleted by the user. They are automatically created for each page and group of page elements.

Each channel will contain a reference to the group of elements it holds and a list of timeline entries. Group channels are added automatically and cannot be created/deleted by the user. This does not apply to channels for audio and misc actions.

There will be two types of entries. Each entry will have a start time and a duration. Group channel entries will play the timeline of the corresponding element. If that timeline's length is finite, the duration of the entry cannot exceed it. Entries for the event channels will perform the action specified instead of playing the timeline of the element.