17.1. Adding audio or video to your document

After opening an XHTML 5, DITA Topic or DocBook 5.1 document in XXE, you'll find an “insert/add media object” toolbar button allowing to add a media element (e.g. XHTML 5 audio and video elements) to your document.

Once properly configured, a media element is rendered by embedding a media player in the styled view. This media player is similar to those found in Web browsers.

Figure 9.19. Two embedded media players, one for video and the other for audio, both having controls
Two embedded media players, one for video and the other for audio, both having controls

Note

This feature, which is based on JavaFX®, will not work if the Java™ runtime used to run XXE is older than version 1.8.0_40. Moreover, this feature may be explicitly disabled by unchecking OptionsPreferences, General|Feature, "In the styled view, render audio and video elements by embedding a media player".

A newly inserted media player is not configured yet (e.g. does not point to any media file) and just looks like a stock audio or video icon.

Figure 9.20. The right-click popup menu of a media player (audio only, no controls)
The right-click popup menu of a media player (audio only, no controls)

In order to configure a media player, you may either:

  • double-click inside it;

  • OR right-click in it and select the Edit menu item;

  • OR drag and drop a media file onto it.

The three above actions all display the media player dialog box.