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:

AttributeValueDescription
idstringThe unique ID of the image.
refstringThe 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.
commentstringA 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.
statusadded
changed
deleted
Indicates the modification status of the image file.
author NEWstringThe author of the tracked change.
dateTime NEWISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

Some images:

xml
<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:

xml
<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:

AttributeValueDescription
refstringRequired. The file path of the audio file. For example, music/the-meaning-of-life.mp3
commentstringWhen the @ref attribute is missing, or the audio file cannot be located, the @comment attribute is displayed in its place.
autoplaytrue
false
Determines whether the audio file is automatically played.
controlstrue
false
Determines whether the audio control buttons are displayed.
looptrue
false
Determines whether to play the audio file in a continuous loop.
idstringThe unique ID of the audio file.
statusadded
changed
deleted
Indicates the modification status of the audio file.
author NEWstringThe author of the tracked change.
dateTime NEWISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

A simple <audio> element:

xml
<audio ref="the-meaning-of-life.mp3" />

Using all the available attributes:

xml
<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:

AttributeValueDescription
typenone
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).
refstringThe file path of the image you want to use as the poster.

With no poster image:

xml
<audio ref="the-meaning-of-life.mp3">
  <poster type="none" />
</audio>

With the default (standard, generic) poster image:

xml
<audio ref="the-meaning-of-life.mp3">
  <poster type="default" />
</audio>

With a custom poster image:

xml
<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:

AttributeValueDescription
refstringRequired. 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.
targetstringThe target document.

With alternate audio files:

xml
<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:

xml
<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:

xml
<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:

AttributeValueDescription
refstringRequired. The file path of the video file. For example, videos/oliver-cromwell.mp4
commentstringWhen the @ref attribute is missing, or the video file cannot be located, the @comment attribute is displayed in its place.
autoplaytrue
false
Determines whether the video file is automatically played.
controlstrue
false
Determines whether the video control buttons are displayed.
looptrue
false
Determines whether to play the video file in a continuous loop.
idstringThe unique ID of the video file.
statusadded
changed
deleted
Indicates the modification status of the video file.
author NEWstringThe author of the tracked change.
dateTime NEWISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

Simple video:

xml
<video ref="oliver-cromwell.mp4" />

Using all the available attributes:

xml
<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:

AttributeValueDescription
typenone
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).
refstringThe file path of the image you want to use as the poster.

With no poster image:

xml
<video ref="oliver-cromwell.mp4">
  <poster type="none" />
</video>

With the default (standard, generic) poster image:

xml
<video ref="oliver-cromwell.mp4">
  <poster type="default" />
</video>

With a custom poster image:

xml
<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:

AttributeValueDescription
refstringRequired. 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.
targetstringThe target document.

With alternate video files:

xml
<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:

xml
<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:

xml
<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>
Last updated: 27 Apr 2026, 18:30:36
Loading navigation...