subtitleOptions property

SubtitleOptions subtitleOptions

Get the subtitle options used in the player.

Implementation

SubtitleOptions get subtitleOptions {
  int audioAllowance = _preferences.get('audio_allowance', defaultValue: 0);
  int subtitleDelay = _preferences.get('subtitle_delay', defaultValue: 0);
  double fontSize = _preferences.get('font_size', defaultValue: 20.0);
  String fontName = _preferences
      .get('font_name/${targetLanguage.languageCode}', defaultValue: '');
  String regexFilter = _preferences.get('regex_filter', defaultValue: '');
  double subtitleBackgroundOpacity =
      _preferences.get('subtitle_background_opacity', defaultValue: 0.0);
  double subtitleOutlineWidth =
      _preferences.get('subtitle_outline_width', defaultValue: 3.0);
  double subtitleBackgroundBlurRadius =
      _preferences.get('subtitle_background_blur_radius', defaultValue: 0.0);
  bool alwaysAboveBottomBar =
      _preferences.get('subtitle_above_bar', defaultValue: false);

  return SubtitleOptions(
    audioAllowance: audioAllowance,
    subtitleDelay: subtitleDelay,
    subtitleBackgroundOpacity: subtitleBackgroundOpacity,
    subtitleBackgroundBlurRadius: subtitleBackgroundBlurRadius,
    fontSize: fontSize,
    fontName: fontName,
    regexFilter: regexFilter,
    subtitleOutlineWidth: subtitleOutlineWidth,
    alwaysAboveBottomBar: alwaysAboveBottomBar,
  );
}