Media
Images
The <image> element inserts an image into your document. Images can exist both inside and outside paragraphs. An image inside a paragraph is placed a native Adobe InDesign inline image. An image outside a paragraph is placed into an Element Image Frame from your Adobe InDesign template. If there are no (or not enough) Element Image Frames, then the image is not used, and a warning is logged.
New in CXML 3.4
<image> now support @author and @dateTime.
<image> has six attributes:
| Attribute | Value | Description |
|---|---|---|
| id | string | The unique ID of the image. |
| ref | string | The file path of the image. File paths are relative to Typefi Server's root directory. However, if you want to use an absolute path instead, select Preserve Original Links in the Links tab of the Create InDesign document or Create InDesign book workflow actions. |
| comment | string | A comment. The comment is also used as the alt text for the image. If the @ref attribute is empty or unresolvable, the @comment attribute is displayed in its place. |
| status | added changed deleted | Indicates the modification status of the image file. |
| author NEW | string | The author of the tracked change. |
| dateTime NEW | ISO 8601 datetime string | The date and time of the tracked change (2024-01-09T14:37:00Z). |
Some images:
<section>
<p>
The famous depiction of galloping horses
<image ref="horses.png" comment="Horses" />
by using coconut shells
<image ref="coconut-shells.png" comment="Coconut shells" />
(a traditional radio-show sound effect)
<image ref="radio.png" comment="Radio" />
came about from the purely practical reason that the production
</p>
<image ref="production-team.png" comment="Production team" />
<p>could not afford real horses.</p>
</section>An image with tracked changes:
<image ref="the-black-night.png"
comment="The Black Knight"
status="added"
author="Graham Chapman"
dateTime="1975-04-05T09:00:00Z" />Audio
The <audio> element inserts an audio file into your document.
New in CXML 3.4
<audio> now supports @author and @dateTime.
<audio> has nine attributes:
| Attribute | Value | Description |
|---|---|---|
| ref | string | Required. The file path of the audio file. For example, music/the-meaning-of-life.mp3 |
| comment | string | When the @ref attribute is missing, or the audio file cannot be located, the @comment attribute is displayed in its place. |
| autoplay | true false | Determines whether the audio file is automatically played. |
| controls | true false | Determines whether the audio control buttons are displayed. |
| loop | true false | Determines whether to play the audio file in a continuous loop. |
| id | string | The unique ID of the audio file. |
| status | added changed deleted | Indicates the modification status of the audio file. |
| author NEW | string | The author of the tracked change. |
| dateTime NEW | ISO 8601 datetime string | The date and time of the tracked change (2024-01-09T14:37:00Z). |
A simple <audio> element:
<audio ref="the-meaning-of-life.mp3" />Using all the available attributes:
<audio ref="the-meaning-of-life.mp3"
comment="The Meaning of Life"
autoplay="true"
controls="true"
loop="true"
id="1234"
status="added"
author="Eric Idle"
dateTime="1983-06-09T09:00:00Z" />Poster images
The <poster> element specifies the type of the poster image you want to display in the play area.
<poster> has two attributes:
| Attribute | Value | Description |
|---|---|---|
| type | none default image | Required. Specifies the type of image you want to appear in the play area. - none shows no poster for the sound clip. - default displays a generic sound poster that isn’t based on the contents of the file. - image lets you select an image to use as the poster (use the @ref attribute to specify the file path of the image). |
| ref | string | The file path of the image you want to use as the poster. |
With no poster image:
<audio ref="the-meaning-of-life.mp3">
<poster type="none" />
</audio>With the default (standard, generic) poster image:
<audio ref="the-meaning-of-life.mp3">
<poster type="default" />
</audio>With a custom poster image:
<audio ref="the-meaning-of-life.mp3">
<poster type="image" ref="the-meaning-of-life.png" />
</audio>Alternate audio files
The <altRef> element is used to specify an alternate audio file.
<altRef> has two attributes:
| Attribute | Value | Description |
|---|---|---|
| ref | string | Required. The file path of the alternate audio file. When the @ref attribute on <audio> is missing, or the audio file cannot be located, <altRef> is used in its place. |
| target | string | The target document. |
With alternate audio files:
<audio ref="the-meaning-of-life.mp3">
<altRef ref="the-meaning-of-life.m4a" />
<altRef ref="the-meaning-of-life.ogg" />
</audio>One possible use of the <altRef> element with the @target attribute:
<audio ref="the-meaning-of-life.mp3">
<altRef ref="the-meaning-of-life.m4a" target="pdf" />
<altRef ref="the-meaning-of-life.ogg" target="epub" />
</audio>You can use all of the elements and attributes in a single <audio> element:
<audio ref="the-meaning-of-life.mp3"
comment="The Meaning of Life"
autoplay="true"
controls="true"
loop="true"
id="1234"
status="added"
author="Eric Idle"
dateTime="1983-06-09T09:00:00Z">
<poster type="image" ref="the-meaning-of-life.png" />
<altRef ref="the-meaning-of-life.m4a" target="pdf" />
<altRef ref="the-meaning-of-life.ogg" target="epub" />
</audio>Video
The <video> element inserts a video file into your document.
New in CXML 3.4
<video> now supports @author and @dateTime.
<video> has nine attributes:
| Attribute | Value | Description |
|---|---|---|
| ref | string | Required. The file path of the video file. For example, videos/oliver-cromwell.mp4 |
| comment | string | When the @ref attribute is missing, or the video file cannot be located, the @comment attribute is displayed in its place. |
| autoplay | true false | Determines whether the video file is automatically played. |
| controls | true false | Determines whether the video control buttons are displayed. |
| loop | true false | Determines whether to play the video file in a continuous loop. |
| id | string | The unique ID of the video file. |
| status | added changed deleted | Indicates the modification status of the video file. |
| author NEW | string | The author of the tracked change. |
| dateTime NEW | ISO 8601 datetime string | The date and time of the tracked change (2024-01-09T14:37:00Z). |
Simple video:
<video ref="oliver-cromwell.mp4" />Using all the available attributes:
<video ref="oliver-cromwell.mp4"
comment="Oliver Cromwell"
autoplay="true"
controls="true"
loop="true"
id="1234"
status="added"
author="Terry Gilliam"
dateTime="1975-04-05T09:00:00Z" />Poster images
The <poster> element specifies the type of the poster image you want to display in the play area.
<poster> has two attributes:
| Attribute | Value | Description |
|---|---|---|
| type | none default image | Required. Specifies the type of image you want to appear in the play area. - none shows no poster for the video clip. - default displays a generic video poster that isn’t based on the contents of the file. - image lets you select an image to use as the poster (use the ref attribute to specify the file path of the image). |
| ref | string | The file path of the image you want to use as the poster. |
With no poster image:
<video ref="oliver-cromwell.mp4">
<poster type="none" />
</video>With the default (standard, generic) poster image:
<video ref="oliver-cromwell.mp4">
<poster type="default" />
</video>With a custom poster image:
<video ref="oliver-cromwell.mp4">
<poster type="image" ref="oliver-cromwell.png" />
</video>Alternate video files
The <altRef> element is used to specify an alternate video file.
<altRef> has two attributes:
| Attribute | Value | Description |
|---|---|---|
| ref | string | Required. The file path of the alternate video file. When the video@ref attribute is missing, or the video file cannot be located, <altRef> is used in its place. |
| target | string | The target document. |
With alternate video files:
<video ref="oliver-cromwell.mp4">
<altRef ref="oliver-cromwell.avi" />
<altRef ref="oliver-cromwell.ogg" />
</video>One possible use of the altRef@target (freeform text) attribute:
<video ref="oliver-cromwell.mp4">
<altRef ref="oliver-cromwell.avi" target="pdf" />
<altRef ref="oliver-cromwell.ogg" target="epub" />
</video>You can use all of the elements and attributes in a single video element:
<video ref="oliver-cromwell.mp4"
comment="Oliver Cromwell"
autoplay="true"
controls="true"
loop="true"
id="1234"
status="added"
author="Terry Gilliam"
dateTime="1975-04-05T09:00:00Z">
<poster type="image" ref="oliver-cromwell.png" />
<altRef ref="oliver-cromwell.avi" target="pdf" />
<altRef ref="oliver-cromwell.ogg" target="epub" />
</video>