Videos
Videos can be referenced in a DITA topic by using the
<object>
element:<object data="path/to/video.mp4" outputclass="video"/>
How to Reference a Video Using a Key
Videos can also be referenced in DITA topics by using a key.
The key must be defined in the DITA map like
this:
<keydef keys="video" href="path/to/video.mp4" format="mp4"/>
The key is referenced in the topic with the
@datakeyref
attribute within the
<object>
element:<object datakeyref="video" outputclass="video" width="480" height="270"/>
How to Change Video Size
It is possible to set the size for your videos directly from a custom CSS
stylesheet:
.video {
width: 480px;
height: 270px;
}
How to Change the Videos Cover
By default, a placeholder is displayed in place of the video. When clicked, this placeholder launches the video. A popup is presented in Acrobat Reader to enable the Multimedia content (the document must be trusted for the video to launch).
It is possible to change this placeholder with a custom one by using the
-oxy-video-cover
property:.video {
-oxy-video-cover: url("files/cover.png");
}
How to Center Videos
It is possible to center the videos by centering their containers like
this:
.video-container {
text-align: center;
}