Block
The Block element is a container that represents a segment of audio within a file. It must be contained within a File or a Block element.
The Block element may contain many Block child containers.
A Block element may also contain one OnStart, one OnFinish, and many OnButton event handlers.
Attribute | Description |
---|---|
ID | The ID of the container. Must be unique across all containers within the package. |
Class | The type or resolution of content within this container. Possible values are "Chapter", "Page", "Sentence", etc.. |
Offset | The beginning of the segment of audio, defined as the number of milliseconds from the end of the previous sibling block. If this is the first block within the parent container, the offset is from the beginning of the parent container. The default value is zero. |
Length | The duration of the segment of audio. This may be omitted for the last block within a container, where it is assumed the block will extend to the end of the parent container. |
Examples
The following file is 60 seconds long. It contains three blocks, one extending from 0 to 20 seconds, one from 20 to 40 seconds, and one 40 to 60 seconds.
<File Href="Lesson12.mp3"> <Block Length="20000"> </Block > <Block Length="20000"> </Block > <Block> </Block> </File>
The following file is 60 seconds long. It contains two blocks, one extending from 0-40 seconds, and the other from 55-60 seconds.
<File Href="Lesson12.mp3"> <Block Length="40000"> </Block> <Block Offset="15000"> </Block> </File>
The following file is 60 seconds long. It contains one block extending from 20 to 40 seconds.
<File Href="Lesson12.mp3"> <Block Offset="20000" Length="20000"> </Block> </File>