Page 1 of 1

Adding a reference to a local video file

Posted: Tue Feb 19, 2013 7:34 pm
by steveinfrance
Hi everyone,

Is there an easy way to add a reference (keyref) that would launch a video file in the webhelp output?

Basically, I've created some screencasts with Camtasia, and I want to link the topic to the relevant mp4 video that is stored on the same server.

Currently in the output it's giving me <span class="xref"> with no link to the file. I've put a keydef in the map file.

Thanks in advance for your help,
Steve

Re: Adding a reference to a local video file

Posted: Wed Feb 20, 2013 4:15 pm
by sorin_ristache
Hi,

You should add an element <xref> in your DITA topic where you want to insert the link to the video, for example:

Code: Select all

<xref keyref="video">video title here</xref>
and define the key in the map that includes the topic, for example:

Code: Select all

<keydef keys="video" href="videos/video_file.mp4"
format="mp4" processing-role="resource-only" navtitle="some title here"/>
For copying the resource file videos/video_file.mp4 automatically to the output directory of the Webhelp transformation you should add also the .mp4 extension to the list of accepted resource types in the file [Oxygen-install-dir]/frameworks/dita/DITA-OT/lib/org.dita.dost.platform/plugin.properties:

Code: Select all

supported_resource_extensions=.pdf;.swf;.mp4
This should transform the <xref> element into a link in the Webhelp output. The problem is that there is a bug in the DITA-OT tool that runs the DITA transformations (which I reported here) so the link will be created only if you add also the scope="external" attribute to the <keydef> element. If you add this scope attribute you have the side effect of not copying the mp4 resource file anymore to the output directory, so you will have to copy it manually.


Regards,
Sorin

Re: Adding a reference to a local video file

Posted: Wed Feb 20, 2013 5:56 pm
by steveinfrance
Hi Sorin,

Thanks for your help and for opening up the bug report.

This is probably a related issue, but I needed to update my keydef href so that it starts with ../../ - otherwise it looks for the mp4 file on the same level.

Thanks,
Steve