Timeline
<Clover.Timeline /><clover-timeline>41 kB loaded by a page with it alone to first view, gzipped87 kB loaded by a page with it alone to first view, styles included, gzipped
Sound, as Presentation 4 shapes it: a Timeline, played as a music app plays it, its artwork beside its title, its captions as lyrics and its chapters as tracks.
<div style={{ height: }}>
<Clover.Timeline iiifContent={url} />
</div><div style="height: px">
<clover-timeline
iiif-content="https://clover.iiif.library.northwestern.edu/mocks/hindenburg/manifest.json">
</clover-timeline>
</div>API reference
Plays the Presentation 4 Timeline you hand it, or loads one itself (iiifContentiiif-content: a
Manifest gives its first Timeline). Inside a Root<clover-root>, given nothing, it plays the Root’s
view when that is a Timeline; Body<clover-body> draws a Timeline view with it. A
Presentation 3 Canvas of sound alone is a Timeline once upgraded, so the Viewer plays one
with it too. It fills its parent, so give the parent a height.
It plays through Canvas, with its transport, captions, chapters and annotations on the recording’s time, as a player: the Timeline’s label is its title and its Manifest’s is under it; its captions and annotations show as lyrics; and where it has room, its chapters are listed as tracks under it. Its artwork is the Timeline’s placeholder Canvas until it first plays, then its accompanying Canvas, each standing in for the other, else its thumbnail, at its own shape. The player’s ground takes the artwork’s colors.
<clover-timeline>
A IIIF Presentation 4 Timeline (sound), played through Canvas, with its transport, captions, chapters and annotations on its time, and its accompanying or placeholder Canvas while it plays. Alone, it plays what it is given; inside a clover-root, given nothing, the root's view when that is a Timeline. As tall as --clover-body-height (60vh) or its own style.
Examples
In a Viewer
The Viewer plays a Manifest’s Timelines with it, as it shows its Canvases with Canvas.
<Viewer iiifContent="https://clover.iiif.library.northwestern.edu/mocks/hindenburg/manifest.json" /><clover-viewer
iiif-content="https://clover.iiif.library.northwestern.edu/mocks/hindenburg/manifest.json"></clover-viewer>Its artwork
A Timeline’s accompanyingContainer is its artwork while it plays, here the box the
broadcast’s reel came in, at its own shape; its ground takes the artwork’s colors.
<Clover.Timeline iiifContent="https://clover.iiif.library.northwestern.edu/mocks/hindenburg/manifest.json" /><clover-timeline
iiif-content="https://clover.iiif.library.northwestern.edu/mocks/hindenburg/manifest.json"></clover-timeline>Formats
Timeline plays what a browser’s audio and video elements play: MP4 (AAC), MP3, Ogg and
WebM, and HLS streams through hls.js, which loads only for one. The format a recording
declares is passed to the browser as it is. A body of Presentation 4’s type Audio plays,
and so does Presentation 3’s Sound. A recording in several files, painted one after
another on its time, plays as one, its time, seek bar and chapters across them all, as
0064 ’s opera in two acts
does.
The IIIF Cookbook’s recipes for sound play with it: 0002 in either version, 0014’s accompanying image, 0103’s annotations and 0434’s choice of formats.
Accessibility
Timeline’s transport is the one Canvas plays video with. Every button and slider is named and has its key in its popover, and the controls stay on screen while keyboard focus is in them. With the view focused, Space or K plays and pauses, J and L skip ten seconds back or forward, and M mutes.
Captions come from the Timeline’s WebVTT files, each in its own language, and show in
the player as lyrics; its plain-text transcript shows in the Panel’s Transcript. The
artwork is described by its Canvas’s label, and every word and control on the player’s
ground keeps its contrast whatever the artwork’s colors. The chapters listed as tracks
say which is playing in words and weight, not color alone. A recording never starts by
itself: it plays when the reader presses Play, or follows a link or the Manifest’s
auto-advance.
Size
A page with a Timeline alone loads the figure beside the title to its first view, playing
MP4 audio; hls.js, for a stream, loads only when one plays. In a Viewer it adds nothing up
front: Body<clover-body> loads Timeline the first time a Timeline shows, and the Default template
stays
94 kB to first view.
What’s next
- The player made without Canvas’s 2D renderer at all, which it no longer draws with.
- Timelines painted into Scenes, and Presentation 4’s
timeMode.