overview • html5 • wizard • streaming • advertising • skins • integration • flashvars • javascript • Premium Plugins
NUEVOPLAYER PLUGINS - CAPTIONS
Back to Nuevoplayer plugins




The Captions plugin for Nuevoplayer supports the display of closed captions .
Captions are read from external files, in the DFXP (TimedText) XML format or in the SubRip plain-text format.
Alternatively, the Captions plugin can display Text Tracks embedded into MP4 files.

Configuration Options

Part of default captions text format can be altered using flahvars described below.
captions (undefined)

Location (URL) of the valid DFXP or SRT captions file.

cc_active (true)

Decides whether to show the captions on startup or not (true/false). Later value is stored as cookie.

cc_size (14)

Default font size (14px).

cc_fullsize (20)

Default font size in fullscreen mode (20px). It's useful to have bigger font size in fullscreen!

cc_color (FFFFFF)

Default text color (default white) in hex format.

cc_font (Arial,sans-serif)

Default font family.

cc_align (center)

Default text alignment.

cc_button (RB)

CC button position (default is right bottom corner). Other possible setting are: LB, LT, RT

cc_buttonoffset (3)

Offset for CC button measured in pixels from defined corner position.


Supported Formats

Captions plugin supports two formats for loading the captions: DFXP (TimedText) XML and SubRip plain-text (SRT). Additionally, the plugin can display Text Tracks embedded in MP4 files.

DFXP (TimedText) - suggested format.

The DFXP format is an XML format also known under name TTML (Timed Text Markup Language).
This is example from the video above :
<?xml version="1.0" encoding="UTF-8"?>
<tt xml:lang="en" xmlns="http://www.w3.org/2006/04/ttaf1" xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling">
<head>

<styling>

<style id="1" tts:fontWeight="bold" tts:fontSize="18" />

<style id="2" tts:fontStyle="italic" tts:fontSize="18" />

<style id="3" tts:fontSize="18" />

<style id="4" tts:color="#FF0000" tts:fontSize="18" />

<style id="5" tts:fontFamily="Times New Roman" tts:fontSize="18" />

<style id="6" tts:color="#00FF00" tts:fontWeight="bold" tts:fontStyle="italic" tts:fontSize="16" />

<style id="7" tts:textDecoration="underline" tts:fontSize="18" />

<style id="8" tts:fontStyle="italic" tts:textDecoration="underline" />

<style id="9" tts:fontSize="16" />

</styling>
</head>
<body>

<div xml:lang="en">

<p begin="00:00:02.0" end="00:00:05.9">This is example of movie captions.</p>

<p begin="00:00:06.0" end="00:00:12.9">Captions can be supplied with XML file in TimedText or SRT format.</p>

<p begin="00:00:13.0" end="00:00:19.9">Captions can be formatted with basic HTML styles.</p>

<p begin="00:00:20.1" end="00:00:26.0" style="3">You can change captions font size</p>

<p begin="00:00:26.1" end="00:00:31.0" style="1">You can set captions font Bold</p>

<p begin="00:00:31.1" end="00:00:36.0" style="2">You can set captions font style Italic</p>

<p begin="00:00:36.1" end="00:00:40.9" style="4">You can change captions text color!</p>

<p begin="00:00:41.1" end="00:00:46.9" style="5">You can change captions text font!<br />This is Times New Roman now.</p>

<p begin="00:00:47.1" end="00:00:52.9" style="7">You can set captions text decoration style (normal, underline)!</p>

<p begin="00:00:53.1" end="00:00:58.9" style="6">You can use multiple formatting types for single style!
Now you can see italic bold font, 16px size.</p>

<p begin="00:00:59.1" end="00:01:07.9" style="9">You can use <span tts:fontWeight="bold">multiple</span> different <span style="8">styles</span> for parts of your <span tts:color="#FF0000">captions!</span></p>

<p begin="00:01:08.0" end="00:01:30.0">Copyright © 2008-2011 NuevoLab.com.</p>

</div>
</body>
</tt>


You can use the <br/> tag inside the paragraphs to force a linebreak.
DFXP XML files should be saved using UTF8 encoding in order to correctly display special characters or local language.

DFXP Captions Text Formatting

The following style properties can be used to style captions.

color: hexadecimal text color value (e.g. #FF0000)
fontFamily: any font name installed on a user's computer (e.g. Tahoma,serif).
fontSize: any font size in pixels (e.g. 18). Default fon tsize is 14.
fontStyle: normal (the default) or italic.
fontWeight: normal (the default) or bold.
textDecoration: none (the default) or underline.


Best practise is to define "<span>" styles in "<head>" section,
however you can also set styles iside each single paragraph.


SubRip (SRT)

The SubRip captions format uses plain text files. Here's an example:
1
00:00:02,000 --> 00:00:5,900
This is example of movie captions.

2
00:00:06,000 --> 00:00:12,900
Captions can be supplied with <u>XML</u> file in <font color="#ff0000">TimedText</font> or SRT format.

3
00:00:41,100 --> 00:00:46,900
You can change captions text font!
This is <b>Times New Roman</b> now.

SRT files should be saved using UTF8 encoding in order to correctly display special characters or local language.

SRT Captions Text Formatting

By default the SRT format does not support any styling by itself, however you can use a few basic HTML tags allowed in flash applications.
Tags <b>, <i> and <u> can be used for setting the weight, style and underline.
The tag <font color="#ff0000" face="Tahoma" size="16"> can be used to set the color, family and size.
Just check example above.


The fastest method to display captions is to set captions flashvar
same way as it is with "file flashvar for your media files.
Of course you must create and upload captions text file in one of described formats.

Please note that we do not offer further assistance or instructional lessons concerning captions plugin.
There is a lot of online documents and tutorials concerning supported captions formats.
There are many tools and online editors like Universal Subtitles, easy to use for creating subtitles.


Nuevoplayer Captions is already built in 100% working FREE to use plugin.
You do not need any additional file, however be sure to download latest Nuevoplayer build files.

Please remind we do not provide free support concerning setup of this plugin or captions usage.
Feel free to experiment with provided settings and documentation.


Back to Nuevoplayer plugins