To comply with the Federal Communications Commission’s (FCC) closed caption rule, Content Providers (CPs) must support closed captions for video. In particular, applications bundled with a device are considered to be part of the device, and are covered by more stringent rules pertaining to devices (Section 203 of the CVAA[1]). For these bundled applications, CP must use either their own solution or manufacturer’s solution for captioning. This solution must handle complicated closed caption user attributes as listed in the FCC rules. The definition of these attributes draws from the CEA 708 standard.

If you want to use Samsung’s solution, we support CEA-708, SMPTE-TT and SAMI formats.

Currently, Player API supports two subtitles types, “sami” and “smpte-tt”. If the subtitles type needs a separate data file, pass the file’s URL as subtitles url option. The video will be played with requested subtitles.

There are caption options in native OSD menu. End users can configure the styles of subtitles. The SMPTE-TT data may contain its own styles. In this case, the OSD menu’s configuration has higher priority than data’s configuration. For more detail, please refer to the table below:

Caption options in OSD Menu

Style from SMPTE-TT

Applied Style

Default

Not specified

Default Style

Default

Specified

Style from SMPTE-TT data

Specified

*

OSD Menu’s configuration

In case of “sami” type subtitles, the sf.serviceVideoPlayer provides “SMI Setting” menu to end users. Users are allowed to change the subtitles language if this operation is supported by the “sami” data. Additionally, subtitles’ synchronization time can be increased or decreased by the user.

There is also a “General” OSD menu level which contains the general subtitles options.

On application exit, the caption file must be deleted. For this, you can use the removeFile function. Its details can be found below.

Function: removeFile(FileName)

Removes a file from device.

Parameter

FileName

Name of file to be deleted.

Return

If call is successful, returns 0.

-1 in case of failure.

Example

webapis.download.removeFile("captionfile.smi");

How to handle caption data (Text & Provider’s caption attribute)

AVPlay object from Media API lets you use an external SMPTE-TT or SMI file for subtitles.

The subtitles callback, onsubtitle(), is called when a single subtitles string should be displayed on the screen. This callback has 3 parameters: sync time, subtitles text string and subtitles text string properties.

The first and second parameters are intuitve. The third parameter supports three possible string values representing respectively: character color, background color and caption window color. The parameters are concatenated with the position of subtitle part that the property should be applied to.

The third parameter is constructed, as follows:

Starting position inside subtitles string that the property should be applied to

(1) Presentation. All apparatus shall implement captioning such that the caption
text may be displayed within one or separate caption windows and supporting
the following modes: text that appears all at once (pop-on), text that scrolls
up as new text appears (roll-up), and text where each new letter or word
is displayed as it arrives (paint-on).
(2) Character color. All apparatus shall implement captioning such that characters
may be displayed in the 64 colors defined in CEA-708 and such that users are
provided with the ability to override the authored color for characters and
select from a palette of at least 8 colors including: white, black, red, green,
blue, yellow, magenta, and cyan.
(3) Character opacity. All apparatus shall implement captioning such that users
are provided with the ability to vary the opacity of captioned text and select
between opaque and semi-transparent opacities.
(4) Character size. All apparatus shall implement captioning such that users are
provided with the ability to vary the size of captioned text and shall provide
a range of such sizes from 50% of the default character size to 200% of
the default character size.
(5) Fonts. All apparatus shall implement captioning such that fonts are available
to implement the eight fonts required by CEA-708 and § 79.102(k). Users must
be provided with the ability to assign the fonts included on their apparatus
as the default font for each of the eight styles contained in § 79.102(k).
(6) Caption background color and opacity. All apparatus shall implement captioning
such that the caption background may be displayed in the 64 colors defined in
CEA-708 and such that users are provided with the ability to override
the authored color for the caption background and select from a palette of
at least 8 colors including: white, black, red, green, blue, yellow, magenta,
and cyan. All apparatus shall implement captioning such that users are provided
with the ability to vary the opacity of the caption background and select
between opaque, semi-transparent, and transparent background opacities.
(7) Character edge attributes. All apparatus shall implement captioning such that
character edge attributes may be displayed and users are provided the ability
to select character edge attributes including: no edge attribute, raised edges,
depressed edges, uniform edges, and drop shadowed edges.
(8) Caption window color. All apparatus shall implement captioning such that
the caption window color may be displayed in the 64 colors defined in CEA-708
and such that users are provided with the ability to override the authored color
for the caption window and select from a palette of at least 8 colors including:
white, black, red, green, blue, yellow, magenta, and cyan. All apparatus shall
implement captioning such that users are provided with the ability to vary
the opacity of the caption window and select between opaque, semi-transparent,
and transparent background opacities.
(9) Language. All apparatus must implement the ability to select between caption
tracks in additional languages when such tracks are present and provide the ability
for the user to select simplified or reduced captions when such captions are
available and identify such a caption track as "easy reader".
(10) Preview and setting retention. All apparatus must provide the ability for
the user to preview default and user selection of the caption features required
by this section, and must retain such settings as the default caption configuration
until changed by the user.
(11) Safe Harbor. Apparatus which implement Society of Motion Picture and Television
Engineers Timed Text format (SMPTE ST 2052-1:2010: "Timed Text Format (SMPTE-TT)"
2010) (incorporated by reference, see § 79.100) with respect to the functionality
in subparts (1) through (10) of this paragraph shall be deemed in compliance with
subpart (c) of this section.