Disable video autoplay using a DITA-OT plugin - Fluid Topics - Latest

DITA Connector Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

With this method, users can allow specific videos to play automatically.

  1. Download a version of DITA-OT up to 3.7.
  2. Download the dita-media-support plugin.
  3. Extract the DITA-OT archive.
  4. Extract the plugin, open the dita-media-support-master folder, and copy the com.oxygenxml.media folder.
  5. Paste the com.oxygenxml.media folder into the plugins directory of the DITA-OT folder.
  6. Open the plugin.xml file, 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.

  7. Open a terminal window.

  8. From the bin subfolder, run the following command:

    ./dita install
    

    The output of this command should be:

    Added com.oxygenxml.media
    
  9. Create an archive containing the DITA-OT folder.

  10. Upload this new DITA-OT archive.
  11. 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" eight="315px">
              <param name="allowfullscreen" value="true"/>
          </object>
        </body>
    </topic>
    

Do not use <param name="autoplay" value="false"/>. It does not disable video autoplay.