- 12 Oct 2009
In this tutorial we discuss how to display captions using NCAM’s CCForFlashAS3 component, which is already implemented in our default players (v.2 or later). These captions are stored in external timed text files formatted in the W3C’s DFXP format or Apple’s QTtext format, both of which can be created with MAGpie, NCAM’s free captioning application, or with CaptionKeeper, NCAM’s line-21 caption-conversion tool. Please note: the CCForFlash component supports the following audio and video types: FLV, F4v, and H264-AAC (MOV, MP4, M4A, M4V, 3gp, 3G2); it does not work with MP3, ShoutCast or YouTube.
Load External Captions Files:
To load your external captions, simply define the following attributes in the <media> node of the XML Playlist; the only attribute that you need to modify is “ccsrc”, which is the path to your caption file:
<media cctype=’external’ ccsrc=’http://www.site.com/captions.dfxp.xml’ cclang=’en’ ccstyle=’true’>video.flv</media>
In our default player we set the ”enableAutoControls” parameter (MediaPlayer’s Component Inspector) to true, so the “CC” button will automatically appear when captions are available (works with Skin Wizard). If you are building your own custom player in Flash CS4/5 (i.e. not using the Skin Wizard), you can use the”enableCaption” parameter (Controller’s Component Inspector) to turn the “CC” button on/off, you can use the “captionsEnable” parameter (MediaPlayer’s Component Inspector) to turn the captions on/off by default; and you will need to open the default player FLA to learn how the CCForFlash component has been implemented.
Sample Player (created with Skin Wizard):