Monday, August 25, 2008

How to embed YouTube video into DITA

You can embed an YouTube flash video into your DITA document using the <object> element.

  1. Get the URL of the movie value from YouTube website. For example: http://www.youtube.com/v/EfmQB0stRRI&26hl=en
  2. Replace any "&"(ampersand) characters in the URL with "%26"
  3. Use that URL in the following DITA <object> element:
<object data="http://www.youtube.com/v/EfmQB0stRRI%26hl=en"
height="355" id="VideoPlayback" type="application/x-shockwave-flash"
width="425">
<param name="movie"
value="http://www.youtube.com/v/EfmQB0stRRI%26hl=en"/>
<param name="FlashVars" value="playerMode=embedded"/>
<param name="allowScriptAcess" value="sameDomain"/>
<param name="scale" value="noScale"/>
<param name="quality" value="best"/>
<param name="bgcolor" value="#FFF"/>
<param name="salign" value="TL"/></object>

No comments: