Styling subtitles

Based on the choosen playback technology, different methods may be used to style subtitles.

Dash

The following CSS code can be used to style Dash subtitles.

video::cue {
    font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
    color: white;
    /* No background */
    background: none;
    /* White text outline */
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

Flash

Using Flash, only the font size and colors can be changed. This is done through player options at initialization time.

var options = {
    'empflash': {
      'swf': './swf/emp-player.swf',
      'fontName': 'default', // timesroman, helvetica, courier, Defaults to 'default'
      'fontColor': '000000',
      'fontBackgroundColor': 'ffffff',
      'fontBackgroundOpacity' : 1.3, // value between 0.0 (transparent) and 2.0 (opaque). Defaults to 1.3
      'fontScaleRatio': 0.015
    }
};