Skip to main content

Add Captions to Your Media

Captions, also known as subtitles, are an essential tool for ensuring access to information and content for diverse audiences. They provide a text-based representation of spoken words or audio in videos, films, TV shows, and other multimedia content. Captions serve multiple purposes, including making content accessible for individuals with hearing loss or deafness, those who speak a different language, or those in noisy environments where audio is difficult to hear. Captions also benefit individuals with cognitive or learning disabilities, as they can help with comprehension and retention of information. Additionally, captions can enhance the overall viewing experience by providing additional context, clarifying dialogue, and improving comprehension for all viewers. In educational settings, captions can assist in language learning, literacy development, and facilitate better understanding of complex subject matter. Overall, captions are crucial in promoting inclusivity, accessibility, and equal access to information and entertainment for a wide range of individuals, making them an indispensable tool in modern media.

LuraPlayer supports embedded and sidecar captions.

Embedded Captions

LuraPlayer detects the embedded captions in CEA-608, CEA-708 or in-manifest WebVTT formats. No additional configuration is needed.

Sidecar Captions

Sidecar captions refer to a specific type of closed captioning format where the caption data is stored separately from the multimedia content.

To configure the caption sources of the video in Lura Player, you can use the following configuration.

AttributeTypeRequiredDescription
urlstringyesURL of the caption that will be loaded
typestringyesMIME type of the caption
languagestringyesLanguage of the caption in ISO 639-1 format

Here are the supported MIME types:

  • text/vtt - Web Video Text Tracks Format (WebVTT)
  • text/plain - SubRip Text (SRT)
  • application/ttml+xml - Timed Text Markup Language (TTML)
  • application/ttaf+xml - Distribution Format Exchange Profile (DFXP)
  • application/smpte-tt+xml - Society of Motion Picture and Television Engineers - Timed Text (SMPTE-TT)
const config = {
...
content: {
media: [
...
{
url: "https://example.com/en.vtt",
type: "text/vtt",
language: "en"
},
{
url: "https://example.com/es.xml",
type: "application/ttml+xml",
language: "es"
},
...
]
}
...
};
const player = new lura.Player();
player.setConfig(config);