changeSubtitle method

Future<void> changeSubtitle({
  1. required VideoViewerSubtitle? subtitle,
  2. required String subtitleName,
})

Implementation

Future<void> changeSubtitle({
  required VideoViewerSubtitle? subtitle,
  required String subtitleName,
}) async {
  _activeSubtitle = subtitleName;
  _activeSubtitleData = null;
  _subtitle = subtitle;
  if (subtitle != null) await _subtitle!.initialize();
  notifyListeners();
}