With this method, users can allow specific videos to play automatically.
- Download a version of DITA-OT up to 3.7.
- Download the
dita-media-supportplugin. - Extract the DITA-OT archive.
- Extract the plugin, open the
dita-media-support-masterfolder, and copy thecom.oxygenxml.mediafolder. - Paste the
com.oxygenxml.mediafolder into thepluginsdirectory of the DITA-OT folder. -
Open the
plugin.xmlfile, and add comment tags (<!-- -->) at the beginning and end of the following lines:<feature extension="com.oxygenxml.pdf.css.xsl.merged2html5" value="xhtmlMedia.xsl" type="file"/> <feature extension="com.oxygenxml.pdf.css.xsl.merged2html5.parameters" value="insertParameters.xml" type="file"/>Adding comment tags around the lines disables them.
-
Open a terminal window.
-
From the
binsubfolder, run the following command:./dita installThe output of this command should be:
Added com.oxygenxml.media -
Create an archive containing the DITA-OT folder.
- Upload this new DITA-OT archive.
-
Publish DITA content containing a video.
For example:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> <topic id="example"> <title>Example topic</title> <body> <object data="videos/MyVideo.mp4" outputclass="video" width="560px" height="315px"> <param name="allowfullscreen" value="true"/> </object> </body> </topic>
Do not use <param name="autoplay" value="false"/>. It does not disable video autoplay.