Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Readme.txt

Plugin which allows referring to videos, embedded videos and audio resources in the DITA content. Using the "iframe" outputclass you can also embed other resources like PDF in DITA topics.

Media plugin which converts the DITA object element to various HTML 5 structures like <video>, <audio> or <iframe>.

The plugin works with DITA OT 1.8, 2.x and 3.x.
Examples:

 1. The DITA structure:
        <object outputclass="audio" type="audio/mpeg" data="Sleep Away.mp3"/>
        
        is converted to:
        
        <audio controls="controls"><source type="audio/mpeg" src="Sleep Away.mp3"></source></audio>
        
 2. The DITA structure:
       <object outputclass="video" type="video/mp4" data="Clip_480_5sec_6mbps_h264.mp4"/>
      
      is converted to:
      
      <video controls="controls"><source type="video/mp4" src="Clip_480_5sec_6mbps_h264.mp4"></source></video>
      
3. The DITA structure:
 
      <object outputclass="iframe" data="https://www.youtube.com/embed/m_vv2s5Trn4"/>
      
      is converted to:
      
      <iframe controls="controls" src="https://www.youtube.com/embed/m_vv2s5Trn4"></iframe>
      
Instead of specifying the video reference using the @data attribute you can also specify it using a parameter like:
  <param name="src" value="clips/Clip_480_5sec_6mbps_h264.mp4"/>
All other parameter elements specified on the DITA <object> are set as attributes on the generated HTML 5 element. 
  
When producing the PDF output, the DITA <object> elements which have @outputclass audio/video or iframe are output as links.

The plugin was updated to also produce similar results from Lightweight DITA <audio> and <video> elements.
For example:
 1. The Lightweight DITA structure:
            <audio>
             <controls/>
             <source value="Sleep Away.mp3" />
            </audio>

        is converted to:
        
        <audio controls="controls"><source src="Sleep Away.mp3"></source></audio>
        
 2. The Lightweight DITA structure:
           <video>
            <controls/>
            <source value="Clip_480_5sec_6mbps_h264.mp4" />
           </video>

      is converted to:
      
      <video controls="controls"><source src="Clip_480_5sec_6mbps_h264.mp4"></source></video>
      
3. The Lightweight DITA structure:
 
          <video>
           <controls/>
           <source value="https://www.youtube.com/embed/m_vv2s5Trn4"/>
          </video>

      is converted to:
      
      <iframe controls="controls" src="https://www.youtube.com/embed/m_vv2s5Trn4"></iframe>

If for a certain HTML type output (for example CHM) you want to add a plain link to the video instead of embedding it there is a parameter called "com.oxygenxml.xhtml.linkToMediaResources" which can be set to "true".

Copyright and License
---------------------
Copyright 2018 Syncro Soft SRL.

This project is licensed under [Apache License 2.0](https://github.com/oxygenxml/dita-media-support/blob/master/LICENSE)

About

DITA Open Toolki plugin which supports outputting HTML 5 video, audio and embedding YouTube videos

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.